← 返回
未分类 中文

Nodemon Config Validator

Validate nodemon config files (nodemon.json, .nodemonrc, package.json#nodemonConfig) for watch settings, ignore patterns, exec conflicts, and best practices....
验证 nodemon 配置文件(nodemon.json、.nodemonrc、package.json#nodemonConfig)的监视设置、忽略模式、exec 冲突以及最佳实践。
charlie-morrison charlie-morrison 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 401
下载
💾 1
安装
1
版本
#latest

概述

Nodemon Config Validator

Validate nodemon.json, .nodemonrc, .nodemonrc.json, and package.json#nodemonConfig for watch performance issues, ignore patterns, exec conflicts, delay settings, and best practices. Supports text, JSON, and summary output formats with CI-friendly exit codes.

Commands

# Full validation (all 22+ rules)
python3 scripts/nodemon_config_validator.py validate nodemon.json

# Quick syntax-only check (structure rules only)
python3 scripts/nodemon_config_validator.py check .nodemonrc

# Explain config in human-readable form
python3 scripts/nodemon_config_validator.py explain nodemon.json

# Suggest improvements
python3 scripts/nodemon_config_validator.py suggest package.json

# JSON output (CI-friendly)
python3 scripts/nodemon_config_validator.py validate nodemon.json --format json

# Summary only (pass/fail + counts)
python3 scripts/nodemon_config_validator.py validate nodemon.json --format summary

# Strict mode (warnings become errors)
python3 scripts/nodemon_config_validator.py validate nodemon.json --strict

Rules (22+)

#CategorySeverityRule
-----------------------------
S1StructureErrorFile not found or unreadable
S2StructureErrorEmpty config
S3StructureErrorInvalid JSON syntax
S4StructureWarningUnknown top-level keys
S5StructureWarningBoth nodemon.json and .nodemonrc present (conflict)
W1WatchWarningEmpty watch array
W2WatchInfoWatch path uses absolute path (portability)
W3WatchErrorWatching node_modules (severe performance issue)
W4WatchInfoNo watch or ext specified (relying on defaults)
E1ExtensionsWarningEmpty ext string
E2ExtensionsWarningWatching too many extensions (>10, performance)
E3ExtensionsInfoMissing common extensions for detected project type
I1IgnoreWarningEmpty ignore array
I2IgnoreInfonode_modules not explicitly ignored
I3IgnoreWarningOverly broad ignore patterns (e.g. "*")
X1ExecWarningexec command with shell injection risk
X2ExecWarningBoth exec and script specified (conflict)
X3ExecInfoexecMap with unusual/unknown extension
D1DelayWarningDelay too low (<100ms, rapid restarts)
D2DelayWarningDelay too high (>10000ms, slow feedback)
B1Best PracticesInfoverbose not set (useful for debugging)
B2Best PracticesWarningNo ignore patterns at all

Output Formats

  • text (default): Human-readable with severity icons
  • json: Machine-parseable JSON array of findings
  • summary: Pass/fail with error/warning/info counts

Exit Codes

  • 0: No errors (warnings/infos only or clean)
  • 1: One or more errors found
  • 2: File not found or invalid input

Requirements

  • Python 3.8+
  • No external dependencies (pure stdlib)

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 06:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 196 📥 67,841
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 680 📥 328,605
it-ops-security

Vulnerability Prioritizer

charlie-morrison
在CVSS评分之外,利用EPSS、CISA KEV、资产关键性、可达性分析以及利用成熟度进行漏洞优先级排序
★ 1 📥 512