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

Remove unicorn/import-index from recommended preset #977

Merged
merged 1 commit into from Jan 2, 2021

Conversation

sindresorhus
Copy link
Owner

It's not compatible with ESM which requires a filename. In April, Node.js packages can target Node.js 12 which supports ESM, so I think it makes sense to remove this from the recommended preset.

@fisker
Copy link
Collaborator

fisker commented Jan 1, 2021

How about just set default value of ignoreImports to true?
I'm not if it work for export ... from, but we can ignore it too if it's not, cjs module will still exists for a while, this rule can be useful.

@fisker
Copy link
Collaborator

fisker commented Jan 1, 2021

Sorry, on a second thought, there is nothing wrong to use require("./index"), so I'm okay with this.

@sindresorhus sindresorhus merged commit ff1cd2e into master Jan 2, 2021
@sindresorhus sindresorhus deleted the import-index branch January 2, 2021 06:00
kripod added a commit to kripod/eslint-plugin-unicorn that referenced this pull request Jan 11, 2021
sindresorhus pushed a commit that referenced this pull request Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants