Conversation
Bumps [eslint](https://github.com/eslint/eslint) from 9.39.2 to 10.0.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v9.39.2...v10.0.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
b5ffbb2 to
390c404
Compare
|
@copilot fix this PR |
|
@davidmfinol I've opened a new pull request, #134, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: davidmfinol <1088474+davidmfinol@users.noreply.github.com>
Fix ESLint 10 compatibility by migrating to pure flat config
|
A newer version of eslint exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
There was a problem hiding this comment.
Pull request overview
This PR upgrades ESLint from version 9.39.2 to the newly released 10.0.0, which is a major version with breaking changes. The upgrade removes deprecated eslintrc support and migrates to native flat configuration format.
Changes:
- Upgrades ESLint to v10.0.0 and adds the
globalspackage (v17.3.0) as a required dependency - Removes deprecated
FlatCompatutility from@eslint/eslintrcand migrates ESLint configuration to native flat config format - Updates various ESLint-related internal dependencies (@eslint/config-array, @eslint/plugin-kit, etc.) to versions compatible with ESLint 10
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Bumps eslint from ^9.39.2 to ^10.0.0 and adds globals ^17.3.0 dependency |
| package-lock.json | Updates ESLint and all related dependencies with new lockfile entries for ESLint 10 ecosystem packages |
| eslint.config.mjs | Migrates from FlatCompat-based config to native flat config by removing FlatCompat/eslintrc imports and using plugin-provided flat configs directly |
Comments suppressed due to low confidence (1)
eslint.config.mjs:69
- The prettier plugin is registered in the plugins object but the configuration does not use the recommended flat config from eslint-plugin-prettier. According to eslint-plugin-prettier v5.x documentation, you should import and spread the recommended configuration rather than manually setting up the plugin and rule. Consider importing
prettier/recommendedconfig which properly configures both the plugin and disables conflicting rules.
...typescriptEslint.configs['flat/recommended'],
jest.configs['flat/recommended'],
prettierConfig,
{
plugins: {
import: fixupPluginRules(_import),
jest,
prettier,
'@typescript-eslint': typescriptEslint
},
languageOptions: {
globals: {
...globals.node,
...globals.jest,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: tsParser,
ecmaVersion: 2023,
sourceType: 'module',
parserOptions: {
project: ['tsconfig.eslint.json'],
tsconfigRootDir: __dirname
}
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: 'tsconfig.eslint.json'
}
}
},
rules: {
camelcase: 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
'no-console': 'off',
'no-shadow': 'off',
'no-unused-vars': 'off',
'prettier/prettier': 'error'
| ...typescriptEslint.configs['flat/recommended'], | ||
| jest.configs['flat/recommended'], | ||
| prettierConfig, |
There was a problem hiding this comment.
The migration from compat.extends() to native flat configs is the correct approach for ESLint 10. However, verify that:
typescriptEslint.configs['flat/recommended']provides equivalent coverage to the previous 'plugin:@typescript-eslint/eslint-recommended' and 'plugin:@typescript-eslint/recommended'jest.configs['flat/recommended']is equivalent to 'plugin:jest/recommended'- The prettier configuration order is correct -
prettierConfig(eslint-config-prettier) should come after other configs to properly disable conflicting rules
The spread operator on line 21 for typescriptEslint configs is correct, but line 22 is missing the spread operator for jest configs, which may not properly apply all the configuration objects from the recommended preset.
| "@typescript-eslint/parser": "^8.53.1", | ||
| "cross-env": "^10.1.0", | ||
| "eslint": "^9.39.2", | ||
| "eslint": "^10.0.0", |
There was a problem hiding this comment.
The TypeScript ESLint packages (@typescript-eslint/eslint-plugin v8.55.0 and @typescript-eslint/parser v8.53.1) have peer dependency requirements that only support ESLint versions ^8.57.0 || ^9.0.0, which does not include ESLint 10.0.0. This will cause peer dependency warnings and potential compatibility issues. You should either:
- Wait for an updated version of
@typescript-eslintpackages that supports ESLint 10, or - Downgrade ESLint to version 9.x until typescript-eslint releases ESLint 10 support
The package-lock.json shows these peer dependency requirements at lines 4177, 4202, 4226, and 4251.
| "eslint": "^10.0.0", | |
| "eslint": "^9.0.0", |
Bumps eslint from 9.39.2 to 10.0.0.
Release notes
Sourced from eslint's releases.
... (truncated)
Commits
4e6c4ac10.0.0ddd8a22Build: changelog update for 10.0.0bff9091feat: handleArray.fromAsyncinarray-callback-return(#20457)1ece282chore: ignore/docs/v9.xin link checker (#20452)034e139ci: add type integration test for@html-eslint/eslint-plugin(#20345)f3fbc2fchore: set@eslint/jsversion to 10.0.0 to skip releasing it (#20466)e978ddadocs: Update README4cecf83docs: Update READMEc79f0abdocs: Update READMEafc0681chore: remove scopeManager.addGlobals patch for typescript-eslint parser (#20...You can trigger a rebase of this PR by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)