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

Proposal: warn on /index imports #985

Closed
mike1808 opened this issue Dec 18, 2017 · 1 comment
Closed

Proposal: warn on /index imports #985

mike1808 opened this issue Dec 18, 2017 · 1 comment

Comments

@mike1808
Copy link

My IDE likes to add /index to the import path when I specify some folder path with index.js file in it. For example:

- module
    - index.js

- file.js
// file.js
import module from './module'

and it becomes

// file.js
import module from './module/index'

Can we have a rule which disallows explicit specification of the index file?

@ljharb
Copy link
Member

ljharb commented Dec 19, 2017

This seems like it'd be handled by #912 - since that could be shortened to ./module, it would warn.

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

No branches or pull requests

2 participants