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

Suggestion to have remove-empty/import off by default #76

Closed
egilll opened this issue Aug 28, 2021 · 1 comment
Closed

Suggestion to have remove-empty/import off by default #76

egilll opened this issue Aug 28, 2021 · 1 comment

Comments

@egilll
Copy link
Contributor

egilll commented Aug 28, 2021

Hi. Importing a module for its side effects only is very common, such as with:

import "core-js/stable";
import "regenerator-runtime/runtime";
import "styles.scss";

plugin-remove-empty's removal of the above is pretty unexpected, I would assume that any developer writing empty imports does so knowingly for the side effects. My question is therefore whether it would be valuable to turn this transformation off by default, in order for Putout's defaults to seem more helpful and sensible to the general developer.

This is just a suggestion, if you disagree please feel free to just close this issue.

@coderaiser
Copy link
Owner

Thank you this is a good idea.
In eslint-plugin-putout there is an ide way of using, and it disables most dangerous rules. I thought about making an option which will disable such rules. Anyways for now I think the best way would be to set baseline with —disable-all.

Related to #65

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

No branches or pull requests

2 participants