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

Rule proposal: disallow no extension imports (folders, file without extension) #204

Closed
vvo opened this issue Mar 4, 2016 · 2 comments · Fixed by #250
Closed

Rule proposal: disallow no extension imports (folders, file without extension) #204

vvo opened this issue Mar 4, 2016 · 2 comments · Fixed by #250

Comments

@vvo
Copy link

vvo commented Mar 4, 2016

I would like to enforce this:

import './file.js';
import './dir/index.js';

versus

import './file';
import './dir/';

While still being able to require files that have no extension of course.

What do you think?

Is that doable?

@benmosher
Copy link
Member

Makes sense. Should be pretty straightforward.

Could be an extension to no-unresolved, or a separate rule. The former should be more efficient.

lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 20, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 22, 2016
lo1tuma added a commit to lo1tuma/eslint-plugin-import that referenced this issue Apr 22, 2016
@vvo
Copy link
Author

vvo commented Apr 23, 2016

Nice!! Thanks community :D

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

Successfully merging a pull request may close this issue.

2 participants