Prettierrc Validator

v1.0.0

Validate and lint Prettier configuration files (.prettierrc, .prettierrc.json, .prettierrc.yaml, .prettierrc.toml, package.json#prettier) for structure, inva...

0· 72·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for charlie-morrison/prettierrc-validator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Prettierrc Validator" (charlie-morrison/prettierrc-validator) from ClawHub.
Skill page: https://clawhub.ai/charlie-morrison/prettierrc-validator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install prettierrc-validator

ClawHub CLI

Package manager switcher

npx clawhub@latest install prettierrc-validator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the provided code and SKILL.md. The bundled Python script implements config parsing and lint rules for Prettier options; there are no unrelated credentials, binaries, or platform hooks requested.
Instruction Scope
Runtime instructions are explicit: run the included Python script against config files. The script reads the specified config file(s) and parses JSON/YAML/TOML (with fallbacks) and does not attempt to read unrelated system files, environment variables, or call external endpoints. JS configs are explicitly excluded from static validation.
Install Mechanism
No install spec is present (instruction-only with a packaged script). No remote downloads or binary installs are requested; optional dependencies (PyYAML, tomli) are standard parsing libraries and only used if present.
Credentials
The skill declares no required environment variables, credentials, or config paths. The code does not reference any secrets or external service tokens.
Persistence & Privilege
always is false and the skill does not request persistent system modifications or modify other skills' configurations. It does not install background services or enable permanent agent-level privileges.
Assessment
This skill appears coherent and low-risk: it bundles a Python script to lint Prettier configs and requires no credentials or installs. Before using it, you may want to (1) quickly scan the included scripts yourself or run them in a sandbox/CI runner on a non-production machine, (2) avoid running it against code you don't trust if you have policies about reading repository files (the tool reads config files you point it at), and (3) be aware that optional dependencies (PyYAML, tomli) are standard parsers — if you install them, use official package sources (PyPI) to avoid supply-chain risks. If you need guarantees beyond this review, run the script with a Python security scanner or inspect the remainder of the file not shown in the truncated preview.

Like a lobster shell, security has layers — review code before you run it.

latestvk97d7rpn7fgg01ybadpndmpkcn84y7s5
72downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

Prettier Config Validator

Validate .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.

Commands

# 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

Supported files

  • .prettierrc (JSON or YAML auto-detected)
  • .prettierrc.json / .prettierrc.json5
  • .prettierrc.yaml / .prettierrc.yml
  • .prettierrc.toml
  • package.json — validates the "prettier" field
  • .prettierrc.js / prettier.config.js — detected but not validated statically

Rules (22)

Structure (5)

  • Invalid JSON / YAML / TOML syntax
  • Unknown top-level options
  • Wrong type for option (boolean, int, string, array expected)
  • Empty config file
  • package.json with missing or invalid prettier field

Options (7)

  • Invalid enum value (quoteProps, trailingComma, arrowParens, proseWrap, htmlWhitespaceSensitivity, endOfLine, embeddedLanguageFormatting)
  • printWidth out of reasonable range (< 20 or > 320)
  • tabWidth invalid (0 or negative, > 16 warning)
  • parser name not a known built-in parser
  • requirePragma + insertPragma both true (conflict)
  • rangeStart > rangeEnd (inverted range)
  • Unknown parser name (plugin-assumed)

Deprecated (2)

  • jsxBracketSameLine → use bracketSameLine (Prettier 2.4+)
  • Removed options (useFlowParser, tabs) with replacement guidance

Overrides (5)

  • Override missing files field
  • files empty array or wrong type
  • Override missing options (no effect)
  • Unknown option inside override
  • Duplicate glob pattern across overrides (precedence bug)

Best Practices (3)

  • Missing endOfLine setting (cross-platform advice)
  • Missing trailingComma (default changed in Prettier v3)
  • printWidth very short (< 40) — may cause awkward line breaks
  • useTabs: true without explicit tabWidth
  • Invalid / empty plugin entries

Output Formats

  • text (default): human-readable with severity icons
  • json: machine-readable list of issues (file, path, rule, severity, message, category)
  • summary: single line of counts

Exit Codes

  • 0: No errors (warnings/info allowed)
  • 1: Errors found
  • 2: Invalid input (file not found, unparseable, unsupported format)

Requirements

  • Python 3.8+
  • Optional: PyYAML (better YAML parsing — falls back to a minimal parser for simple configs)
  • Optional: tomli (only for Python 3.10 and below; Python 3.11+ has tomllib built in)

Examples

Broken config

{ "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'

Good CI gate

python3 scripts/prettierrc_validator.py lint .prettierrc.json --format summary
# exit 1 on any error — fails the CI step

Comments

Loading comments...