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

Chore: remove undocumented Linter#rules property (refs #9161) #11335

Merged
merged 3 commits into from Jan 30, 2019

Conversation

not-an-aardvark
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[x] Other, please explain:

What changes did you make? (Give an overview)

This removes the undocumented rules property from Linter instances, as part of the effort to remove undocumented API surface from Linter (also see #9161). Config processing now exclusively uses Linter's public API when defining rules. As a side-effect, the rule map utility in lib/rules.js no longer needs to access the filesystem, so we can remove the odd code generation logic from the browserify build.

Is there anything you'd like reviewers to focus on?

Nothing in particular

This removes the undocumented `rules` property from `Linter` instances, as part of the effort to remove undocumented API surface from `Linter` (also see #9161). Config processing now exclusively uses `Linter`'s public API when defining rules. As a side-effect, the rule map utility in `lib/rules.js` no longer needs to access the filesystem, so we can remove the odd code generation logic from the browserify build.
@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Jan 30, 2019
@not-an-aardvark not-an-aardvark changed the title Chore: remove undocumented Linter.rules property (refs #9161) Chore: remove undocumented Linter#rules property (refs #9161) Jan 30, 2019
Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one note.

Regarding the removed tests in tests/lib/rules.js, are we still testing custom rule directory loading functionality elsewhere?

Makefile.js Outdated Show resolved Hide resolved
@not-an-aardvark
Copy link
Member Author

Good catch, I'd assumed lib/load-rules.js was tested independently, but it seems like that wasn't the case. I just updated the tests that were removed from rules.js to instead test load-rules.js directly.

@not-an-aardvark not-an-aardvark merged commit c1fd6f5 into master Jan 30, 2019
@not-an-aardvark not-an-aardvark deleted the hide-linter-rules-property branch January 30, 2019 18:34
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 30, 2019
@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 Jul 30, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants