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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

randycoulman commented Dec 18, 2016

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

refactor(find): Use new eslint getRules() api
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

refactor(find): Use new eslint getRules() api
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 added a commit that referenced this issue May 5, 2017

refactor(find): Use new eslint getRules() api (#237)
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