File tree 1 file changed +12
-0
lines changed
packages/eslint-config-airbnb-base/rules
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,19 @@ module.exports = {
63
63
// Disallow specified names in exports
64
64
// https://eslint.org/docs/rules/no-restricted-exports
65
65
'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
+ // },
66
77
restrictedNamedExports : [
78
+ // TODO: semver-major: In conjunction with the above restrictDefaultExports, remove 'default' below
67
79
'default' , // use `export default` to provide a default export
68
80
'then' , // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
69
81
] ,
You can’t perform that action at this time.
0 commit comments