feat: make no-cycle ignore Flow imports (fixes #1098)#1126
Conversation
| function checkSourceValue(sourceNode, importer) { | ||
| const imported = Exports.get(sourceNode.value, context) | ||
|
|
||
| if (sourceNode.parent.importKind === 'type') { |
There was a problem hiding this comment.
sourceNode.parent seems undefined at times - many tests are failing
There was a problem hiding this comment.
Oops. Was running tests with --grep option. Fixed.
|
@ljharb What is the fix here? eslint <= 4 does not provide the necessary AST information to describe type import. |
|
@gajus can eslint 4 parse the types at all? |
It is the However, I am not familiar enough with the internals of ESLint to say what is the reason ESLint <= 4 AST visitor does not inherit properties required to describe the import kind. All |
|
Whats the status of this? Without this fix eslint-plugin-import is unusable if I have Flow in my project :( |
|
The tests need to pass before it can be merged. |
|
Of course, but does anybody work on it? Or this PR is abandoned? |
|
If you want to help finish it, please post a link here to your branch (not a new PR) and I’ll pull in your commits :-) |
|
Sorry, I probably didn't get how to do it properly, but here is my branch: https://github.com/PinkaminaDianePie/eslint-plugin-import/tree/fix/no-cycle-false-positive-for-flow-imports |
1 similar comment
|
Looks like the CI is failing because of unrelated tests. |
|
@gajus the travis failures are flukes; i've rerun them. the appveyor failures are unrelated, and likely in master. |
|
nice, i hope it will be merged finally :D |
|
The issue appeared again in v2.17.1 |
|
@IhorSyerkov please file a new issue for that. |
|
It happens in v2.17.0, but not v2.16.0. @IhorSyerkov did you make that issue? Please link it to this one. |
No description provided.