-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): remove imports from typescript-estree #706
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
fix(eslint-plugin): remove imports from typescript-estree #706
Conversation
mikeharder
commented
Jul 15, 2019
- Fixes eslint-plugin should not import from typescript-estree #705
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 is the wrong way to do it.
There is no reason to have a dependency on typescript-estree
, as everything that should be required is exposed via experimental-utils
.
The better place to fix this is the one place it's erroring: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/rules/prefer-readonly.ts#L5
@bradzacher: Are you suggesting the following change at this location?
If so, should this rule be changed in the same way?
Finally, what about this rule? typescript-eslint/packages/eslint-plugin/src/rules/triple-slash-reference.ts Lines 2 to 7 in af70a59
|
yes, that's what I mean!
Unfortunately VSCode's auto importer likes to suggest packages that aren't direct dependencies, and it's hard to catch that error in reviews. There are some lint fixes in the pipeline to catch this in future. It looks like you already have done it, but could you please make sure that there are no results for this grep |
@bradzacher: The 3 rules I linked above are the only I found with |
Having a look, all 3 should be from the import {
Literal, // TSEStree.Literal
Node, // TSESTree.Node
TSExternalModuleReference, // TSEStree.TSExternalModuleReference
} from '@typescript-eslint/typescript-estree/dist/ts-estree/ts-estree'; |
I think I know the changes required then, will update this PR. |
78b9d7f
to
3dee0d2
Compare
3dee0d2
to
cad6baa
Compare
Codecov Report
@@ Coverage Diff @@
## master #706 +/- ##
=======================================
Coverage 94.33% 94.33%
=======================================
Files 111 111
Lines 4593 4593
Branches 1268 1268
=======================================
Hits 4333 4333
Misses 149 149
Partials 111 111
|
@bradzacher: I believe I have updated this PR with the changes you requested. |
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.
perfect! thanks for doing this!