feat(linter): default to ESLint v10 for new workspaces and projects#35304
Draft
leosvelperez wants to merge 2 commits intomasterfrom
Draft
feat(linter): default to ESLint v10 for new workspaces and projects#35304leosvelperez wants to merge 2 commits intomasterfrom
leosvelperez wants to merge 2 commits intomasterfrom
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit 811d4c2
☁️ Nx Cloud last updated this comment at |
New workspaces and projects now scaffold with ESLint v10 and its ecosystem (typescript-eslint, @eslint/js, @eslint/eslintrc, @eslint/compat, and the Vue/Angular lint stacks). Existing workspaces continue to work with their installed ESLint version: dependency additions keep installed versions untouched and new ecosystem packages are pinned to a range compatible with the workspace's ESLint major. Version pins are now resolved through per-package compat maps keyed on the installed ESLint major, mirroring the @nx/angular approach, so future majors can be added by updating a single data structure.
Pin ESLint v8 on fresh workspaces when eslintrc is explicitly requested, and error out when v10+ is already installed, since v10 drops native eslintrc support.
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.
Current Behavior
Nx generators scaffold ESLint projects with ESLint v9 and its ecosystem. When run in an existing workspace, the same generators overwrite ecosystem packages with hardcoded v9 pins instead of respecting what the user already has installed.
Expected Behavior
typescript-eslint,@eslint/js,@eslint/eslintrc,@eslint/compat,eslint-plugin-vue,@vue/eslint-config-typescript, etc.).Implementation Notes
Version pins are now resolved through per-package compat maps keyed on the installed ESLint major, mirroring the
@nx/angularapproach. Adding support for a future ESLint major reduces to updating a single data structure.