Skip to content
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

The eslint:recommended status of rules is stored in two different places #8370

Closed
not-an-aardvark opened this issue Mar 31, 2017 · 1 comment
Assignees
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing

Comments

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Mar 31, 2017

Currently, we store the eslint:recommended status of rules in eslint-recommended.json, but each rule also has a meta.recommended property. I think eslint-recommended.json is used to create the eslint:recommended config at runtime, whereas meta.recommended is used to generate the docs.

This is a bit confusing -- the information is duplicated, and the effects of changing a flag in either file aren't immediately clear. It has also caused some problems in practice. One rule was out of sync for awhile between the actual behavior and the docs before being fixed in #8215. Another rule still is out of sync. Two rules were added to eslint:recommended in a chore PR here, which probably should have been a breaking change.

We should combine the two sources of information here to avoid confusion and unexpected errors.

@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Mar 31, 2017
not-an-aardvark added a commit that referenced this issue Mar 31, 2017
no-unsafe-negation was added to eslint:recommended in #7467, but this is not reflected in the docs. This commit updates the docs to indicate that no-unsafe-negation is in eslint:recommended.

(refs #8370)
not-an-aardvark added a commit that referenced this issue Mar 31, 2017
no-unsafe-negation was added to eslint:recommended in #7467, but this is not reflected in the docs. This commit updates the docs to indicate that no-unsafe-negation is in eslint:recommended.

Similarly, no-negated-in-lhs and no-native-reassign have not been in eslint:recommended since #7467, so this commit updates the docs to indicate that.

(refs #8370)
not-an-aardvark added a commit that referenced this issue Mar 31, 2017
Previously, a rule's "recommended" status was stored in two places: the rule's metadata, and the conf/eslint-recommended.js file. This commit updates the eslint:recommended generation to only generate eslint:recommended from metadata, and remove the eslint-recommended.js file.
not-an-aardvark added a commit that referenced this issue Mar 31, 2017
no-unsafe-negation was added to eslint:recommended in #7467, but this is not reflected in the docs. This commit updates the docs to indicate that no-unsafe-negation is in eslint:recommended.

Similarly, no-negated-in-lhs and no-native-reassign have not been in eslint:recommended since #7467, so this commit updates the docs to indicate that.

(refs #8370)
@not-an-aardvark not-an-aardvark self-assigned this Apr 1, 2017
not-an-aardvark added a commit that referenced this issue Apr 1, 2017
Previously, a rule's "recommended" status was stored in two places: the rule's metadata, and the conf/eslint-recommended.js file. This commit updates the eslint:recommended generation to only generate eslint:recommended from metadata, and remove the eslint-recommended.js file.
@not-an-aardvark
Copy link
Member Author

Closing this for now, see #8382

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

No branches or pull requests

1 participant