feat: upgrade ESLint to v10 and migrate to flat config#516
Open
nx-plugin-for-aws wants to merge 1 commit intomainfrom
Open
feat: upgrade ESLint to v10 and migrate to flat config#516nx-plugin-for-aws wants to merge 1 commit intomainfrom
nx-plugin-for-aws wants to merge 1 commit intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #516 +/- ##
==========================================
- Coverage 90.80% 90.70% -0.10%
==========================================
Files 90 90
Lines 3207 3218 +11
Branches 705 707 +2
==========================================
+ Hits 2912 2919 +7
- Misses 122 124 +2
- Partials 173 175 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b7cd890 to
1f9cb9a
Compare
Upgrade the workspace and all generated user projects to ESLint 10. Workspace changes: - Update eslint from 9.x to 10.1.0 - Migrate .eslintrc.json to eslint.config.mjs (flat config) - Remove .eslintignore (patterns moved into flat config) - Fix new ESLint 10 recommended rule violations Generated project changes: - Vend eslint@10.1.0, @eslint/js, @eslint/compat, typescript-eslint - Override React ESLint plugin versions pinned by @nx/react - Wrap nx.configs['flat/react'] with @eslint/compat fixupConfigRules to handle APIs removed in ESLint 10 (e.g. context.getFilename) - Add overrides/resolutions for npm/yarn/pnpm peer dep resolution
1f9cb9a to
a16756a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for this change
ESLint 10 was released with several improvements and new recommended rules. The workspace was using ESLint 9 with legacy
.eslintrc.jsonconfiguration files, which are no longer supported in ESLint 10. Additionally, user projects generated by the plugin should also use ESLint 10.Description of changes
ESLint v10 upgrade (workspace):
eslintfrom 9.39.4 to 10.1.0@eslint/js@10.0.1andtypescript-eslint@8.57.2as direct dependenciesjsonc-eslint-parser@3.1.0as a direct dependency.eslintrc.jsontoeslint.config.mjsfor root, packages/nx-plugin, and e2e.eslintignore(patterns moved into flat config ignores)nx.jsontarget defaults and named inputsESLint v10 for generated user projects:
eslint@10.1.0,@eslint/js@10.0.1,@eslint/compat@2.0.3,typescript-eslint@8.57.2toversions.tsandconfigureEslint()@nx/reactwith latest compatible versions (eslint-plugin-react@7.37.5,eslint-plugin-react-hooks@5.2.0,eslint-plugin-import@2.32.0,eslint-plugin-jsx-a11y@6.10.2)fixupEslintReactConfig()to wrapnx.configs['flat/react']with@eslint/compat'sfixupConfigRules(), since React ESLint plugins use APIs removed in ESLint 10 (e.g.context.getFilename())overrides/resolutionsfor all package managers (npm, yarn, pnpm) to handle strict peer dependency resolutionDescription of how you validated changes
pnpm nx run-many --target build --all)Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license