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

Switch to the getRules API instead of reading the directory contents #211

Closed
mgol opened this issue Dec 10, 2016 · 2 comments
Closed

Switch to the getRules API instead of reading the directory contents #211

mgol opened this issue Dec 10, 2016 · 2 comments

Comments

@mgol
Copy link

mgol commented Dec 10, 2016

Now that eslint/eslint#7669 has landed this tool can switch to the new getRules() API and stop reading the ESLint package contents (unless the API is not available, i.e. for older ESLint versions).

This will make the tools independent of ESLint potentially changing its package structure which is private and would make it possible to add features like #172.

@ljharb
Copy link
Collaborator

ljharb commented Dec 11, 2016

Probably best to avoid two code paths, and up the required eslint version in a breaking change.

@randycoulman
Copy link
Contributor

I started to work on this, but very quickly ran into a dependency issue. In order to require a minimum version of ESLint 3.12.0, we also need to upgrade to a newer version of eslint-config-kentcdodds. In order to get support for ESLint 3.x, we need at least version 7.0.0 (we're at 6.2.0). But upgrading that dependency results in numerous lint errors, because this codebase no longer conforms to the latest rules in that config. At first glance, it looks like a lot of the updated rules are looking to take advantage of ES6 features.

As I understand it, ES6 conversion of this project is ongoing in #200, and part of that PR moves us over to xo instead of eslint.

How would you like to address this issue? Does it need to wait for #200 to land? If so, when is that likely to happen? Is there any way I can help move it along?

randycoulman added a commit to randycoulman/eslint-find-rules that referenced this issue Mar 11, 2017
Breaking change: Requires eslint >= 3.12.0

Starting with version 3.12.0, eslint provides a getRules()
API that allows us to directly access the rules rather than
trying to load them from the file system.  This is cleaner,
eliminates a dependency on the internal structure of the eslint
codebase, and may even be faster.

This change paves the way for further features involving
deprecated rules, such as sarbbottam#172 and sarbbottam#188.

Closes sarbbottam#211.
randycoulman added a commit to randycoulman/eslint-find-rules that referenced this issue May 2, 2017
Breaking change: Requires eslint >= 3.12.0

Starting with version 3.12.0, eslint provides a getRules()
API that allows us to directly access the rules rather than
trying to load them from the file system.  This is cleaner,
eliminates a dependency on the internal structure of the eslint
codebase, and may even be faster.

This change paves the way for further features involving
deprecated rules, such as sarbbottam#172 and sarbbottam#188.

Closes sarbbottam#211.
ta2edchimp pushed a commit that referenced this issue May 5, 2017
Breaking change: Requires eslint >= 3.12.0

Starting with version 3.12.0, eslint provides a getRules()
API that allows us to directly access the rules rather than
trying to load them from the file system.  This is cleaner,
eliminates a dependency on the internal structure of the eslint
codebase, and may even be faster.

This change paves the way for further features involving
deprecated rules, such as #172 and #188.

Closes #211.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants