-
-
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
Rule Proposal: Disallow certain extensions in import path #209
Comments
Interesting. This is almost the converse of #204. Makes me think maybe a rule could support both by either enforcing extensions ( For my memory: may want to stat paths that fail to check that they don't exist without an extension (i.e. directories) |
lo1tuma
changed the title
Rule Proposal: Disallow file certain extensions in import path
Rule Proposal: Disallo certain extensions in import path
Mar 7, 2016
lo1tuma
changed the title
Rule Proposal: Disallo certain extensions in import path
Rule Proposal: Disallow certain extensions in import path
Mar 7, 2016
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 20, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 22, 2016
This fixes import-js#209 and fixes import-js#204.
lo1tuma
added a commit
to lo1tuma/eslint-plugin-import
that referenced
this issue
Apr 22, 2016
This fixes import-js#209 and fixes import-js#204.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I transpile my
.jsx
files with babel they will be renamed to have a.js
extension. That’s why I usually avoid the.jsx
extentions in the import path, but sometimes other contributors of my project commit code that has import statements with file extensions.Having an eslint rule would be perfect to identify such problems.
When the rule is configured with:
no-import-file-extensions: [ 2, [ '.js', '.jsx', '.json' ] ]
this would be considered as problems:This would not be considered as a problem:
The text was updated successfully, but these errors were encountered: