Skip to content

chore(deps-dev): migrate ESLint to v9 with flat config#908

Merged
kodiakhq[bot] merged 4 commits intomasterfrom
copilot/update-eslint-to-version-9
Mar 11, 2026
Merged

chore(deps-dev): migrate ESLint to v9 with flat config#908
kodiakhq[bot] merged 4 commits intomasterfrom
copilot/update-eslint-to-version-9

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Upgrades ESLint from v8 to v9 and migrates the config from .eslintrc.json (legacy format) to eslint.config.mjs (flat config). Replaces two deprecated packages and adds no extra compatibility shims.

Package changes

  • eslint → ^9.39.4
  • @typescript-eslint/{eslint-plugin,parser} → ^8.57.0; added typescript-eslint ^8.57.0
  • eslint-plugin-sonarjs → ^4.0.2
  • eslint-plugin-security → ^4.0.0
  • eslint-plugin-jest → ^29.15.0
  • eslint-plugin-no-secrets → ^2.3.3
  • eslint-import-resolver-typescript → ^4.4.4
  • eslint-plugin-array-func → ^5.1.1 (now ESM-only, flat config required)
  • eslint-plugin-import → ^2.32.0
  • eslint-plugin-node replaced with eslint-plugin-n ^17.24.0 (maintained fork; rules renamed n/*)
  • eslint-plugin-eslint-comments replaced with @eslint-community/eslint-plugin-eslint-comments ^4.7.1
  • eslint-plugin-deprecation removed — replaced by the built-in @typescript-eslint/no-deprecated rule (no extra package needed)
  • Added globals ^15.15.0

Config migration

  • eslint.config.mjs created; .eslintrc.json and .eslintignore removed
  • deprecation/deprecation: warn replaced with @typescript-eslint/no-deprecated: warn — same behavior, no external plugin required
  • Non-TypeScript files (.mjs, .cjs, .js) get tseslint.configs.disableTypeChecked to exclude them from typed linting
  • New rules introduced by upgraded presets that have no equivalent in the previous config are explicitly turned off to preserve prior lint behavior: @typescript-eslint/only-throw-error, sonarjs/slow-regex, sonarjs/no-hardcoded-secrets, sonarjs/no-hardcoded-passwords, sonarjs/assertions-in-tests
  • nullish-coalescing-operators added to n/no-unsupported-features/es-syntax ignores — eslint-plugin-n detects ?? usage against the Node 12.x engine range (old eslint-plugin-node missed this); the underlying compatibility issue requires separate author attention
Original prompt

This section details on the original issue you should resolve

<issue_title>Update eslint to version 9</issue_title>
<issue_description>@copilot make the necessary changes to update eslint to version 9 and related dependencies, do this by going through the following PR:

Instructions:

  1. Create a new branch for all the changes
  2. Do not bypass the current CI workflows
  3. Only if necessary update other devDependencies
  4. Important: do not add or remove any previous eslint rules
  5. Fix any error caused by the new version of eslint
  6. You can skip fixing warnings
  7. When you finish open a PR and wait for review

References:

<agent_instructions>Update only devDependencies and do not change the files inside .github or .devcontainer, but you can change the format of the source files if need it, other changes related to modification of complying with eslint rules must require the author intervention.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 10, 2026 14:30
Co-authored-by: leosuncin <4307697+leosuncin@users.noreply.github.com>
Co-authored-by: leosuncin <4307697+leosuncin@users.noreply.github.com>
Copilot AI changed the title [WIP] Update eslint to version 9 and related dependencies chore(deps-dev): migrate ESLint to v9 with flat config Mar 10, 2026
@leosuncin
Copy link
Owner

@copilot you can uninstall eslint-plugin-deprecation and replace it with @typescript-eslint/no-deprecated rule

…slint/no-deprecated rule

Co-authored-by: leosuncin <4307697+leosuncin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 10, 2026

@copilot you can uninstall eslint-plugin-deprecation and replace it with @typescript-eslint/no-deprecated rule

Done in 95654ee. Removed eslint-plugin-deprecation and @eslint/compat, and replaced deprecation/deprecation: warn with @typescript-eslint/no-deprecated: warn in the flat config.

@leosuncin leosuncin marked this pull request as ready for review March 11, 2026 13:31
@leosuncin leosuncin added the automerge Auto merge PR with Kodiak label Mar 11, 2026
@kodiakhq kodiakhq bot merged commit 8c341a7 into master Mar 11, 2026
12 checks passed
@kodiakhq kodiakhq bot deleted the copilot/update-eslint-to-version-9 branch March 11, 2026 13:31
@leosuncin
Copy link
Owner

🎉 This PR is included in version 1.1.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Auto merge PR with Kodiak released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update eslint to version 9

2 participants