forked from mysticatea/eslint-plugin-node
-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error: require file extension '.js or .svg' (n/file-extension-in-import) #11
Comments
mrtnzlml
added a commit
to adeira/universe
that referenced
this issue
Feb 27, 2022
This fixes broken master, again. See: eslint-community/eslint-plugin-n#11
yes, it's expected(changelog). the main reason is node.js esm requires it. see the docs: https://nodejs.org/api/esm.html#mandatory-file-extensions |
kodiakhq bot
pushed a commit
to adeira/universe
that referenced
this issue
Feb 28, 2022
This fixes broken master, again. See: eslint-community/eslint-plugin-n#11
adeira-github-bot
pushed a commit
to mrtnzlml-archive/kochka.com.mx
that referenced
this issue
Feb 28, 2022
This fixes broken master, again. See: eslint-community/eslint-plugin-n#11 adeira-source-id: d63535b707c43dc0b4749b51f14803b7ddcc88ea
adeira-github-bot
pushed a commit
to adeira/abacus-kochka
that referenced
this issue
Feb 28, 2022
This fixes broken master, again. See: eslint-community/eslint-plugin-n#11 adeira-source-id: d63535b707c43dc0b4749b51f14803b7ddcc88ea
adeira-github-bot
pushed a commit
to adeira/relay-example
that referenced
this issue
Feb 28, 2022
This fixes broken master, again. See: eslint-community/eslint-plugin-n#11 adeira-source-id: d63535b707c43dc0b4749b51f14803b7ddcc88ea
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, there is a breaking change between versions 14 and 15 and I would like to report/discuss whether it's intentional or not (and how to fix it).
Basically, rule
n/file-extension-in-import
started reporting the following errors:The thing is that everything works as it did before. Moreover, other imports are not problematic. I think it happens only when there are more files with the same name. For example in this case the content of the folder I am trying to import from is:
Is it intentional behavior? How should it be fixed? I could of course add the extensions like so:
However, that goes against
import/extensions
because we disallow extensions. What is the motivation behind this change and what is the correct behavior?The text was updated successfully, but these errors were encountered: