| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Upgrade ESLint from 8.57.0 to 10.5.0. ESLint 10 removes support for the legacy `.eslintrc` format entirely, so the configuration is migrated to the new flat config (`eslint.config.mjs`). Changes: - Bump `eslint` 8.57.0 -> 10.5.0 and `eslint-plugin-jest` to 29.15.2. - Replace the legacy `@typescript-eslint/eslint-plugin` + `@typescript-eslint/parser` pair with the `typescript-eslint` meta-package (8.62.0), which supports ESLint 10. - Replace the deprecated `eslint-plugin-node` (unmaintained, broken on ESLint 9+) with its maintained fork `eslint-plugin-n` (18.1.0); the single rule in use, `node/no-extraneous-import`, becomes `n/no-extraneous-import`. - Add `@eslint/js` (10.0.1) and `globals` (17.7.0), now required by flat config. - Translate `.eslintrc.js` to `eslint.config.mjs` and `.eslintignore` to the flat config `ignores`, preserving all existing rules and the test-file overrides. - Update the `lint`/`lint:fix` scripts to invoke `eslint` directly (flat config is auto-detected; the `--config ./.eslintrc.js` flag is removed). `preserve-caught-error` (new in ESLint 10's recommended set) is disabled to keep the previous lint behavior; adopting it requires an ES2022 target and is left as a follow-up. Only dev/lint dependencies change, so runtime deps and the built `dist/` output are unchanged. Note: `.eslintrc.js` was previously auto-synced from actions/reusable-workflows. Upstream has not yet published a flat config, so this migration intentionally deviates from that auto-sync until upstream catches up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
This PR upgrades the repository’s linting toolchain to ESLint v10 and migrates from legacy .eslintrc to the flat config format (eslint.config.mjs), along with the necessary ecosystem/plugin upgrades to maintain compatibility.
Changes:
| File | Description |
|---|---|
| package.json | Updates lint scripts and devDependencies to ESLint 10 + flat-config-compatible plugins/packages. |
| package-lock.json | Lockfile updates reflecting the new ESLint/tooling dependency graph. |
| eslint.config.mjs | Introduces the flat ESLint configuration with ignores, TS + Jest setup, and updated n/ rule usage. |
| .eslintrc.js | Removes the legacy ESLint configuration (no longer supported in ESLint 10). |
| .eslintignore | Removes legacy ignore file in favor of flat config ignores. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
I had a quick look into this one myself, I was concerned that there was some automated tooling in place to sync from actions/reusable-workflows. If that's the case this would break this PR. I wonder if it's worth raising a fix in that repo first? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Upgrades ESLint from 8.57.0 → 10.5.0. ESLint 10 removes support for the legacy .eslintrc format entirely, so this migrates the configuration to the new flat config (eslint.config.mjs).
This supersedes the standalone Dependabot bump in #1022, which could not work on its own: bumping eslint to 10 without coordinating the @typescript-eslint upgrade and the flat-config migration triggers an ERESOLVE peer conflict (the old @typescript-eslint/eslint-plugin caps eslint at ^9) and leaves the action with an unsupported .eslintrc.js.
Changes
Behavior preservation
Validation
Note on auto-sync
.eslintrc.js was previously auto-synced from actions/reusable-workflows. Upstream has not yet published a flat config, so this migration intentionally deviates from that auto-sync until upstream catches up.