Skip to content

Wire up eslint/prettier CLI scripts (configs exist but aren't runnable) #4

Description

@Shinrai

Found while onboarding the v4 CI/release flow (#2) — out of scope for that change, filing separately.

lint: .configs/eslint.config.mjs exists (imports @eslint/js, globals, @eslint/json, @eslint/markdown, @eslint/css, @html-eslint/eslint-plugin, @html-eslint/parser) but eslint itself was never added as a devDependency — there's no node_modules/.bin/eslint and no lint/lint:fix npm script. The config is currently dead weight.

format/format:check: .configs/.prettierrc exists and prettier is installed, but running prettier --config .configs/.prettierrc --check . repo-wide hits two problems:

  1. Couldn't resolve parser "jsonv" — the *.jsonv override in .prettierrc sets "parser": "jsonv" but there's no "plugins" entry registering this package's own plugin for the CLI (the test suite only works because it imports the plugin programmatically and passes it to prettier.format() directly).
  2. tests/fixtures/unformatted.jsonv is deliberately unformatted (used by format.test.vitest.mjs to assert the plugin actually changes it) — a blanket prettier --write . would corrupt that fixture and silently break the test's premise.

To wire these up: install eslint + the plugins the config already imports (or trim the config to only the plugins actually needed), add "plugins": ["./dist/index.mjs"] (or equivalent) to .prettierrc so the CLI can format .jsonv files, and scope any format/format:check script to exclude tests/fixtures/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions