docs: update v9 migration guide for @eslint/js usage#20540
docs: update v9 migration guide for @eslint/js usage#20540mdjermanovic merged 2 commits intoeslint:mainfrom
@eslint/js usage#20540Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
docs/src/use/migrate-to-10.0.0.md
Outdated
| ## <a name="eslint-js-removal"></a> `@eslint/js` no longer a direct dependency | ||
|
|
||
| The removal of eslintrc also removes the `@eslint/js` dependency from the "eslint" package. | ||
| As such `@eslint/js` must now be explicitly added to your `package.json` if you import one of its configurations. | ||
|
|
||
| **To address:** Explicitly add the `@eslint/js` dependency when using it in your `eslint.config.js`. |
There was a problem hiding this comment.
I think this isn't a breaking change. It was already recommended to install this package, as it being a dependency of eslint doesn't guarantee it will be available for import from the config file.
Here in v9.x docs, instructions were to install the @eslint/js package:
There was a problem hiding this comment.
Yes, while it is mentioned in the docs, it was not part of the migration guide for v9. So users only reading and applying the migration guides will get an error even though they followed it (see the referenced discussion).
There was a problem hiding this comment.
I don’t think this qualifies as a breaking change in ESLint, since ESLint itself does not depend on @eslint/js to function. If users weren’t installing it explicitly, that was incorrect. They shouldn’t rely on dependencies that are indirectly installed by another plugin.
There was a problem hiding this comment.
Yes, while it is mentioned in the docs, it was not part of the migration guide for v9. So users only reading and applying the migration guides will get an error even though they followed it (see the referenced discussion).
v9 migration guide has a section for the new default config format (using the @eslint/js package in config files is important for the new config format only):
There it links to the configuration migration guide where it is also stated to install @eslint/js:
There was a problem hiding this comment.
Ah, I see there's another section about "eslint:recommended" and "eslint:all" because those string references used to work with the new config format in ESLint v8. Perhaps we should add instructions to install @eslint/js there.
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
This pull request was auto-closed due to inactivity. While we wish we could keep working on every request, we unfortunately don't have the bandwidth to continue here and need to focus on other things. You can resubmit this pull request if you would like to continue working on it. |
|
I’m reopening this issue since it went stale. @DMartens are you still available to work on this PR? |
|
Sorry for dropping the ball on this and thanks for re-opening lumir. |
@eslint/js usage
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Add the removal of
@eslint/jsto the migration guide (reported here).As we dropped
@eslint/jsfrom our dependencies, users must now explicitly add it to their dependencies.Is there anything you'd like reviewers to focus on?
No