Skip to content

Commit

Permalink
fix(errors): Move no-restricted-exports to es6 rules, enable
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Sep 29, 2020
1 parent abb2346 commit b9845de
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
3 changes: 0 additions & 3 deletions packages/eslint-config-zillow-base/rules/errors.js
Expand Up @@ -112,9 +112,6 @@ module.exports = {
// disallow multiple spaces in a regular expression literal
'no-regex-spaces': 'error',

// https://eslint.org/docs/rules/no-restricted-exports
'no-restricted-exports': 'off',

// https://eslint.org/docs/rules/no-setter-return
'no-setter-return': 'error',

Expand Down
11 changes: 11 additions & 0 deletions packages/eslint-config-zillow-base/rules/es6.js
Expand Up @@ -63,6 +63,17 @@ module.exports = {
// https://eslint.org/docs/rules/no-new-symbol
'no-new-symbol': 'error',

// Disallow specified names in exports
// https://eslint.org/docs/rules/no-restricted-exports
'no-restricted-exports': ['error', {
restrictedNamedExports: [
// use `export default` to provide a default export
'default',
// this will cause tons of confusion when your module is dynamically `import()`ed
'then',
],
}],

// disallow specific imports
// https://eslint.org/docs/rules/no-restricted-imports
'no-restricted-imports': ['off', {
Expand Down
Expand Up @@ -1172,7 +1172,13 @@ Object {
"error",
],
"no-restricted-exports": Array [
"off",
"error",
Object {
"restrictedNamedExports": Array [
"default",
"then",
],
},
],
"no-restricted-globals": Array [
"error",
Expand Down

0 comments on commit b9845de

Please sign in to comment.