Eslint-plugin-import: import/no-cycle should not trigger for Flow imports

Created on 23 Apr 2019  路  10Comments  路  Source: benmosher/eslint-plugin-import

This is a regression of #1098 (fix in PR #1126) that was re-introduced in v2.17.0.

v2.16.0 works as expected. v2.17.2 still has this regression.

bug flow help wanted

Most helpful comment

Not sure if it is on the radar of this project, but it is also worth mentioning there is a similar issue with Typescript.

All 10 comments

Not sure if it is on the radar of this project, but it is also worth mentioning there is a similar issue with Typescript.

@jonathanrdelgado it is, if an issue is filed - please file one if there isn鈥檛 one already.

Has anybody had time to look into this? 2.17.3 still has this regression 馃檹

Hey folks. I looked into this and it turns out the reason for the regression is that the original fix was subsequently removed by this pr. You can tell that #1218 is the cause of the issue because commit 70a59fe is the first commit that introduces this regression

if you look at the current state of the file, it hasn't changed since this break
https://github.com/benmosher/eslint-plugin-import/blob/master/src/rules/no-cycle.js#L34

Thanks, seems like a simple PR to restore it, but with a test case to prevent it from being removed again.

I don't really have context for why this was removed so I may not be the best person for this. I tried to write a test case to reproduce the error we get on our codebase but to my surprise, no error occurs. It could be that I'm not using the tests properly but it could also be that this error only is reproducible with a certain kind of setup.

https://github.com/benmosher/eslint-plugin-import/pull/1494 was opened to fix this on 5th Oct, but as yet has not been approved.
cc: @ljharb

Yes, thanks, I'm aware. It's been on my list.

Great, thanks 馃榾

Thank you for this :D :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rhettlivingston picture rhettlivingston  路  31Comments

dizzyn picture dizzyn  路  43Comments

kirill-konshin picture kirill-konshin  路  22Comments

Robinfr picture Robinfr  路  27Comments

mieszko4 picture mieszko4  路  25Comments