Skip to content

chore: modernize dev tooling — ESLint 10 + Prettier 3 + mocha 11 + chai 4#5

Merged
edwardsmit merged 1 commit into
mainfrom
chore/modernize-dev-tooling
May 20, 2026
Merged

chore: modernize dev tooling — ESLint 10 + Prettier 3 + mocha 11 + chai 4#5
edwardsmit merged 1 commit into
mainfrom
chore/modernize-dev-tooling

Conversation

@edwardsmit
Copy link
Copy Markdown
Owner

Summary

Dev tooling brought up to 2026 standards. No runtime behavior change — all 82 mocha tests still pass, conformance spec green, Node 4 floor smoke green, runtime npm audit --omit=dev reports 0 vulnerabilities.

What changed

Out (2014-era) In (2026)
.jshintrc (JSHint, vestigial) eslint.config.js (ESLint 10 flat config, ES5-targeted)
.jscs.json (JSCS, archived 2016) .prettierrc.json (Prettier 3)
Gruntfile.js (Grunt 0.4) npm scripts (lint, format, format:check, test)
mocha ~1.12.0 (2013) mocha ^11.7.5
chai ~1.7.2 (2013) chai ^4.5.0 (last CJS-compatible)

Source files reformatted by Prettier — verified semantics-preserving by conformance spec staying green.

Audit picture

Audit Before After
npm audit --omit=dev (runtime) 0 0
npm audit (full, incl. devDeps) 27 vulns 3 vulns

Remaining 3 are upstream in mocha@11.7.5's transitive diff and serialize-javascript (mocha is on its latest; no downstream fix). Dev-only, doesn't ship.

CI changes

  • New job: Lint + formateslint . + prettier --check .
  • npm install no longer needs --legacy-peer-deps
  • audit job no longer swallows non-zero with || echo — hard-fails on runtime vulns

Test plan

  • Lint + format job green
  • All 4 Node matrix jobs green (mocha 11 + chai 4)
  • All 9 Docker floor jobs green (Node 0.10 → 16)
  • Conformance against qs@latest green
  • npm audit (runtime only) green
  • Human gate review

Notes

  • No version bump needed — devDep changes don't affect the published tarball
  • npm pack --dry-run will still ship the same 7 files (LICENSE, README, SECURITY.md, index.js, lib/param.js, lib/deparam.js, package.json)
  • npm pack itself unchanged in size — devDeps don't ship

…ai 4

Dev-only change; no runtime behavior shift. Verified: 82 mocha tests
still pass, conformance spec green, Node 4 floor smoke green, runtime
audit clean (0 vulns).

Tooling changes:
- Remove .jshintrc, .jscs.json, Gruntfile.js (JSCS dead since 2016,
  JSHint vestigial, Grunt 0.4 unmaintained).
- Add eslint.config.js (flat config, ES5-targeted for lib/test files).
- Add .prettierrc.json + .prettierignore.
- Replace grunt-* devDeps with eslint + @eslint/js + prettier.
- Bump mocha ~1.12.0 → ^11 and chai ~1.7.2 → ^4 (chai 4 is last
  CJS-compatible; chai 5 is ESM-only). Tests use should() API which
  is compatible across both major versions.

Source files reformatted by Prettier (no semantic changes — verified
by conformance spec staying green).

Scripts:
- New: npm run lint, npm run format, npm run format:check
- npm test now runs lint + format:check + mocha

CI:
- New job: Lint + format (eslint + prettier --check)
- npm install no longer needs --legacy-peer-deps
- npm audit job removed `|| echo` swallow; now hard-fails on runtime
  vulns.

Full audit (incl. devDeps) reduced from 27 vulns to 3 (all in mocha's
transitive deps on latest mocha; dev-only, doesn't ship).
@edwardsmit edwardsmit merged commit 09de989 into main May 20, 2026
16 checks passed
@edwardsmit edwardsmit deleted the chore/modernize-dev-tooling branch May 20, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant