Skip to content

feat: upgrade ESLint to v10 with flat config migration#432

Merged
ThisIsDemetrio merged 2 commits intomasterfrom
copilot/update-eslint-to-v10
Apr 22, 2026
Merged

feat: upgrade ESLint to v10 with flat config migration#432
ThisIsDemetrio merged 2 commits intomasterfrom
copilot/update-eslint-to-v10

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

ESLint v8 → v10 requires migrating from the legacy .eslintrc format to the new flat config system. @mia-platform/eslint-config-mia@9 was evaluated but dropped — it depends on eslint-plugin-import@2.x which calls sourceCode.getTokenOrCommentAfter(), an internal API removed in ESLint v10.

Changes

Dependencies (package.json)

  • eslint: ^8.53.0^10.2.1
  • Removed @mia-platform/eslint-config-mia (ESLint v10 incompatible)
  • Added @eslint/js@^10.0.1 and globals@^17.5.0 as replacements
  • Removed eslintConfig field (legacy format, unsupported in ESLint v9+)
  • Lint script: dropped --ignore-path .gitignore (replaced by ignores in flat config)

New eslint.config.js — flat config using @eslint/js recommended rules with Node.js CommonJS globals, ecmaVersion: 2022, and explicit ignore patterns:

const js = require('@eslint/js')
const globals = require('globals')

module.exports = [
  { ignores: ['node_modules/**', 'coverage/**', '.nyc_output/**', '.tap/**', 'example/**'] },
  js.configs.recommended,
  {
    languageOptions: {
      ecmaVersion: 2022,
      sourceType: 'commonjs',
      globals: { ...globals.node, ...globals.es2022 },
    },
  },
]

Stale eslint-disable comments removed across 5 files for rules removed/renamed in ESLint v9+:

  • valid-jsdoc — rule removed
  • global-require — rule removed
  • id-blacklist — renamed to id-denylist
  • Unused no-console and no-shadow inline directives

Checklist

  • your branch will not cause merge conflict with master
  • run npm test
  • tests are included
  • the documentation is updated or integrated accordingly with your changes
  • the code will follow the lint rules and style of the project
  • you are not committing extraneous files or sensible data

Copilot AI and others added 2 commits April 22, 2026 09:02
…s flat config

Agent-Logs-Url: https://github.com/mia-platform/lc39/sessions/958e52ae-c196-47dd-b503-17e169f4aaad

Co-authored-by: ThisIsDemetrio <5429953+ThisIsDemetrio@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mia-platform/lc39/sessions/958e52ae-c196-47dd-b503-17e169f4aaad

Co-authored-by: ThisIsDemetrio <5429953+ThisIsDemetrio@users.noreply.github.com>
@ThisIsDemetrio ThisIsDemetrio merged commit 2265515 into master Apr 22, 2026
5 checks passed
@ThisIsDemetrio ThisIsDemetrio deleted the copilot/update-eslint-to-v10 branch April 22, 2026 09:19
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.

2 participants