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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Shareable configs page edits and expansion #16824
docs: Shareable configs page edits and expansion #16824
Changes from 2 commits
bf8c924
5acc289
9bf0e27
150b6e6
f05e772
804381e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep the "Shareable configs are designed to work with the
extends
feature of.eslintrc
files." sentence so that it isn't expected that they can be used in other ways. For example, we had a bug report that shareable configs don't work with--config
(#15697).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the proposed changes are pretty clear that the shareable config should be in the ESLint config file.
Do you think we should add some sentence like: "You cannot use shareable configs with the ESLint CLI
--config
flag"?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that would be good.
(although, technically it is possible to use a shareable config package with
--config
, e.g.eslint --config node_modules/eslint-config-airbnb/index.js
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's still some ambiguity with the current wording. "Include it in the extends field". What is "it"? (We know it's a string, but maybe "it" should "the config name" or something more specific?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't true, a
@scope/eslint-config-myconfig
package can be used by specifying"extends": "@scope/myconfig"
. The only case where"eslint-config"
sequence must appear in the config specifier is when specifying a subpath of a@scope/eslint-config
package, like in the example on line 150 ("extends": "@scope/eslint-config/my-special-config"
), because"@scope/my-special-config"
would be interpreted as"@scope/eslint-config-my-special-config"
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. I think this is a case where the old docs were also incorrect, so probably a good idea to clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, clarified the text and example in latest version