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

ESLint Plugin Import - prefer-default-export #96

Open
grahamlangford opened this issue Aug 22, 2023 · 5 comments
Open

ESLint Plugin Import - prefer-default-export #96

grahamlangford opened this issue Aug 22, 2023 · 5 comments

Comments

@grahamlangford
Copy link
Collaborator

https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md

@fregante
Copy link
Collaborator

fregante commented Oct 7, 2023

I tried enabling this, there are 165 errors in the extension. While I always use this rule, I don’t think it would be well-liked

https://github.com/pixiebrix/pixiebrix-extension/actions/runs/6439735844/job/17487763557

@grahamlangford
Copy link
Collaborator Author

This was added as a result of a comment on an old PR: pixiebrix/pixiebrix-extension#6115 (comment)

It's not a priority. I'll discuss it with the engineering team before we move forward. With the number of errors, we'd likely make it a warning first if we move forward with it at all.

@grahamlangford
Copy link
Collaborator Author

Alternatively, we could enforce only named exports using https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md. I'm not strongly tied to either approach, just looking for consistency.

@fregante
Copy link
Collaborator

  • 758 results for "export default"

I'd say prefer-default-export is still preferable 😃

@grahamlangford
Copy link
Collaborator Author

Looks like the team prefers prefer-default-export anyway: https://pixiebrix.slack.com/archives/C023KL47XV4/p1697040027674289

Not a priority to fix. I support turning it on as a warning for now.

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