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 config] [base] record semver-major default export changes in no-restricted-exports #2721

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/eslint-config-airbnb-base/rules/es6.js
Expand Up @@ -63,7 +63,19 @@ module.exports = {
// Disallow specified names in exports
// https://eslint.org/docs/rules/no-restricted-exports
'no-restricted-exports': ['error', {
// TODO: semver-major: Uncomment the `restrictDefaultExports` below to permit re-exports of a module
// default export while still blocking other "default" exports.
// The 'default' entry in restrictedNamedExports must also be removed.
// See https://github.com/airbnb/javascript/issues/2500 and https://github.com/eslint/eslint/pull/16785
// restrictDefaultExports: {
// direct: false, // permits `export default` declarations
// named: true, // restricts `export { foo as default };` declarations
// defaultFrom: false, // permits `export { default } from 'foo';` declarations
// namedFrom: false, // permits `export { foo as default } from 'foo';` declarations
// namespaceFrom: true, // restricts `export * as default from 'foo';` declarations
// },
restrictedNamedExports: [
// TODO: semver-major: In conjunction with the above restrictDefaultExports, remove 'default' below
'default', // use `export default` to provide a default export
'then', // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
],
Expand Down