-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
[no-restricted-exports] Fails on export { default } from ...
#2500
Comments
You're right, it definitely should be acceptable. This seems like a bug in eslint itself, given https://eslint.org/docs/rules/no-restricted-exports#default-exports Can you file that on eslint? |
Filed! :) eslint/eslint#15617 |
just FTR, a quick workaround for me was adding "no-restricted-exports": ["error", {
"restrictedNamedExports": [
"then"
]
}], to it would have been quicker to just add "no-restricted-exports": "off" but I just wanted to remove the |
eslint/eslint#16785 has now resolved eslint/eslint#15617 with a fix available upstream by disabling We can remove the @ljharb would you accept a PR changing this config in the rules in this repo? Edit: I'm not quite sure to handle backwards compatibility with older eslint versions when a new configuration option like this is added though, are there some examples I can refer to? |
@elyobo if we enabled the option, it would break on eslint versions older than the one that added it - so, it's a breaking change to do so. This means that there should be a "TODO" comment above the rule, describing it as semver-major, and what change to make - that way, when we next have a breaking change, I'll do a sweep through the comments for any rules that are waiting to be enabled. |
…no-restricted-exports Records breaking configuration changes to permit `export { default } from` style exports as of eslint 8.33.0. See airbnb#2500
OK, thanks for the explanation, I've opened #2721.
|
Thanks, that's great. |
As the title states. Fails when re-exporting the default from another module.
This feels like it should pass, since this is not a named export. https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js#L67
The text was updated successfully, but these errors were encountered: