Repository navigation
docs: add eslint to install command - #258
Conversation
|
Thank you for filing a PR for this. |
"peerDependencies": {
"eslint": "^10.0.0"
},
"peerDependenciesMeta": {
"eslint": {
"optional": true
}
}We could add the same settings for this plugin (and also That would be a breaking change, though, because it could break |
|
The rationale for removing The initial commit did include Given the original rationale, I believe we can simply add instructions to install As for why I think this distinction explains why So, to clarify, I’m +1 on this change. It would also bring the |
Updated installation instructions for ESLint to include options for various package managers.
lumirlumir
left a comment
There was a problem hiding this comment.
LGTM, thanks!
It looks good to me, but I’d like to know what @DMartens and @fasttime think about the comment in #258 (comment) before merging.
I believe that’s the original thread for the discussion around peerDependencies, but I just wanted to double-check.
The optional peer dependency in I think the optional peer dependency solves a different problem and it wouldn’t help in the use case described in the OP, since npm doesn't automatically install optional peer dependencies. A mandatory peer dependency would, but that would come with other drawbacks. |
|
Thank you for the context lumir. |
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
Documentation update.
@eslint/jsondoes not declareeslintas a peer dependency, so installing the plugin alone does not install ESLint. However, the install commands in the README only include@eslint/json, which may lead new users to miss the requiredeslintdependency. This PR updates the install commands to includeeslintso users can get started without missing dependencies.What changes did you make? (Give an overview)
Added
eslintto the install commands in the README for npm, yarn, pnpm, and bun:npm install @eslint/json -D→npm install eslint @eslint/json -Dyarn add @eslint/json -D→yarn add eslint @eslint/json -Dpnpm install @eslint/json -D→pnpm install eslint @eslint/json -Dbun add @eslint/json -D→bun add eslint @eslint/json -DRelated Issues
Is there anything you'd like reviewers to focus on?
No.