-
Notifications
You must be signed in to change notification settings - Fork 1
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
Should we implement eslint rule: import/no-default-export
?
#4
Comments
yes; can I add it now ? :) |
I suggest looking at your codebases, and see how often this is still used. Maybe not in the normal "components" that you write, but more in other supported files (often around tooling).
Are we okay with either manually configuring them all, or constantly disabling those linting rules there? |
We use it often, because we are used to it. The vue-skeleton even has the opposite rule - prefer default export, when there's a single export. We can enable this rule only for the |
Sorry, I meant to say; legitimate use (according to our proposed conventions)
That would be a sound option. 👿 Are we okay with "hardcoding" the |
Default exports are used to export components in pages in the NextJS framework. I'm updating the configuration to disallow unnamed default exports, default exports will still be allowed. |
Maybe we should also consider this rule:
import/no-default-export
. I never worked with that rule enabled so I don't know the downsides, but sometimes I run into problems when refactoring in the IDE that names are not updated because of the default export. I don't know if there is an added value for default exports over named exports.Originally posted by @hjeti in mediamonks/frontend-coding-standards#6 (comment)
The text was updated successfully, but these errors were encountered: