File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/eslint-config-airbnb-base/rules Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,19 @@ module.exports = {
6363 // Disallow specified names in exports
6464 // https://eslint.org/docs/rules/no-restricted-exports
6565 'no-restricted-exports' : [ 'error' , {
66+ // TODO: semver-major: Uncomment the `restrictDefaultExports` below to permit re-exports of a module
67+ // default export while still blocking other "default" exports.
68+ // The 'default' entry in restrictedNamedExports must also be removed.
69+ // See https://github.com/airbnb/javascript/issues/2500 and https://github.com/eslint/eslint/pull/16785
70+ // restrictDefaultExports: {
71+ // direct: false, // permits `export default` declarations
72+ // named: true, // restricts `export { foo as default };` declarations
73+ // defaultFrom: false, // permits `export { default } from 'foo';` declarations
74+ // namedFrom: false, // permits `export { foo as default } from 'foo';` declarations
75+ // namespaceFrom: true, // restricts `export * as default from 'foo';` declarations
76+ // },
6677 restrictedNamedExports : [
78+ // TODO: semver-major: In conjunction with the above restrictDefaultExports, remove 'default' below
6779 'default' , // use `export default` to provide a default export
6880 'then' , // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
6981 ] ,
You can’t perform that action at this time.
0 commit comments