Install
openclaw skills install prettierrc-validatorValidate and lint Prettier configuration files (.prettierrc, .prettierrc.json, .prettierrc.yaml, .prettierrc.toml, package.json#prettier) for structure, invalid options, deprecated fields, override conflicts, and best practices. 22 rules across 5 categories.
openclaw skills install prettierrc-validatorValidate .prettierrc config files for correctness, deprecated options, conflicting overrides, and best practices. Supports JSON, YAML, TOML, and package.json#prettier field. JS configs are detected but not statically validated.
# Full lint (all rules)
python3 scripts/prettierrc_validator.py lint .prettierrc.json
# Check enum values, ranges, type conflicts only
python3 scripts/prettierrc_validator.py options .prettierrc.json
# Check deprecated/removed options only
python3 scripts/prettierrc_validator.py deprecated .prettierrc.json
# Validate 'overrides' array only
python3 scripts/prettierrc_validator.py overrides .prettierrc.json
# Validate structure/syntax only
python3 scripts/prettierrc_validator.py validate .prettierrc.json
# JSON output (for CI / tooling)
python3 scripts/prettierrc_validator.py lint .prettierrc.json --format json
# Summary line only
python3 scripts/prettierrc_validator.py lint .prettierrc.json --format summary
.prettierrc (JSON or YAML auto-detected).prettierrc.json / .prettierrc.json5.prettierrc.yaml / .prettierrc.yml.prettierrc.tomlpackage.json — validates the "prettier" field.prettierrc.js / prettier.config.js — detected but not validated staticallypackage.json with missing or invalid prettier fieldprintWidth out of reasonable range (< 20 or > 320)tabWidth invalid (0 or negative, > 16 warning)parser name not a known built-in parserrequirePragma + insertPragma both true (conflict)rangeStart > rangeEnd (inverted range)jsxBracketSameLine → use bracketSameLine (Prettier 2.4+)useFlowParser, tabs) with replacement guidancefiles fieldfiles empty array or wrong typeoptions (no effect)endOfLine setting (cross-platform advice)trailingComma (default changed in Prettier v3)printWidth very short (< 40) — may cause awkward line breaksuseTabs: true without explicit tabWidthPyYAML (better YAML parsing — falls back to a minimal parser for simple configs)tomli (only for Python 3.10 and below; Python 3.11+ has tomllib built in){ "printWidth": "100", "trailingComma": "some", "jsxBracketSameLine": true }
✗ ERROR wrong-type [printWidth] must be an integer
✗ ERROR invalid-enum-value [trailingComma] invalid value 'some' (valid: all, es5, none)
⚠ WARNING deprecated-option [jsxBracketSameLine] use 'bracketSameLine'
python3 scripts/prettierrc_validator.py lint .prettierrc.json --format summary
# exit 1 on any error — fails the CI step