-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Better handling of non-existent node_modules directory #271
Comments
Ah, yeah, seems like package refs (even internal ones) should should not trigger @vvo: did you imagine the i.e. import foo from './foo.js' // valid
import bar from './bar' // invalid if filename is actually `bar.js`
import React from 'react' // valid if points to a package and not `react.js` |
Dunno about the "always mode" but your example is valid and expected. |
But import bar from './bar' // invalid if filename is actually `bar.js` Actually if there's a folder named "bar" I would want to disable requiring it. Requiring folders involves magic and hides the filetree from the code. |
Fair enough. So: a flag (allow-packages) that allows a folder reference? |
Actually I just realized that the main issue may be that the extensions rule needs to ignore unresolved imports. This is a standard behavior that would resolve @sindresorhus's original issue regardless of what mode he put it in. |
fixed by #296 |
I ran this plugin in a project without a
node_modules
directory. I hadn't yet runnpm install
.This is what I got:
I don't think the
import/extensions
rule should report in this case. It's just noise.The text was updated successfully, but these errors were encountered: