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

no-cycle: consider deep require calls #1056

Open
benmosher opened this issue Mar 30, 2018 · 6 comments
Open

no-cycle: consider deep require calls #1056

benmosher opened this issue Mar 30, 2018 · 6 comments

Comments

@benmosher
Copy link
Member

Just making a note to come back to no-cycle and capture require calls in ExportMap to check for cycles in addition to exploring import statements.

@yelworc
Copy link

yelworc commented Aug 23, 2019

I'd appreciate this a lot; just fiddled with the no-cycle rule for a while, only to realize that it just doesn't work for good old regular Node.js projects (it does say so in the docs, but it's not quite obvious).

Just had a quick look at ExportMap myself, but this doesn't strike me as an easy first contribution :)

@soryy708
Copy link
Contributor

There's eslint-plugin-dependencies that used to work with require, but it seems abandoned.
Perhaps it can be scavenged?

@soryy708
Copy link
Contributor

Related: #971

@soryy708
Copy link
Contributor

soryy708 commented Oct 24, 2019

I'm writing some tests for this. How do you expect this to work with regards to the commonjs option? Should it look for dependency cycles in requires only if commonjs: true?

(Link to documentation)

@soryy708
Copy link
Contributor

So this is sort-of a revert of #797 ?

@ljharb
Copy link
Member

ljharb commented Oct 24, 2019

sort of, just reverted behind the option :-) (and avoiding the crash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants