Skip to content

chore(lint): migrate ESLint to flat config and fix violations - #693

Merged
kopernic-pl merged 2 commits into
mainfrom
fix/eslint-flat-config
Sep 15, 2026
Merged

kopernic-pl merged 2 commits into
mainfrom
fix/eslint-flat-config

Conversation

@kopernic-pl

@kopernic-pl kopernic-pl commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Migrates ESLint configuration from the legacy .eslintrc format to the new flat config (eslint.config.mjs), required since ESLint v9+
  • Replaces eslint-plugin-node (incompatible with ESLint v9+) with eslint-plugin-n, the actively maintained fork with native flat config support
  • Bumps eslint minimum version to ^10.10.0
  • Fixes pre-existing lint violations that were hidden while lint was broken: no-use-before-define in rename.js, max-len violations, and auto-fixable style issues (quotes, semicolons, spacing) across src/ and test/

Note: Lint has been broken since April 2024 when ESLint was bumped from v8 to v9 without migrating the config.

Test plan

  • npm run lint exits clean with no errors
  • npm test — 430 passing, 0 failing

🤖 Generated with Claude Code

ESLint v9+ dropped support for .eslintrc. Lint has been broken since
the April 2024 bump to ESLint v9. This migrates to the flat config
format (eslint.config.mjs) and fixes violations that were hidden.

- Replace .eslintrc with eslint.config.mjs (flat config)
- Replace eslint-plugin-node (incompatible with ESLint v9+) with
  eslint-plugin-n, the maintained fork with flat config support
- Bump eslint minimum to ^10.10.0
- Fix no-use-before-define in src/commands/api/rename.js
- Fix max-len violations in src, test/resources, and test/support
- Auto-fix quote style, semicolons, and spacing across src and test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The project used husky v9 but still had the old v4-style config in
package.json. Husky v5+ dropped that format, so the pre-push hook
(lint + test) was silently never executed. This adds the .husky/pre-push
script and a prepare script to initialize husky on npm install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kopernic-pl
kopernic-pl merged commit ee227ff into main Sep 15, 2026
5 checks passed
@kopernic-pl
kopernic-pl deleted the fix/eslint-flat-config branch September 15, 2026 14:20
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.

3 participants