Skip to content

Commit d282e05

Browse files
lencioniljharb
authored andcommitted
Add import/no-restricted-paths to imports rules
This rule was added by 1.10.0. I am setting it to be disabled because it is very project-specific, so it doesn't make sense to enable it here. https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md I found the sections of this file a little confusing, so I didn't know where to put it. I think it would be better to simply alphabetize the rules but I'll leave that for another time.
1 parent 82629f1 commit d282e05

File tree

1 file changed

+4
-0
lines changed
  • packages/eslint-config-airbnb-base/rules

1 file changed

+4
-0
lines changed

packages/eslint-config-airbnb-base/rules/imports.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,9 @@ module.exports = {
124124
// Require modules with a single export to use a default export
125125
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
126126
'import/prefer-default-export': 2,
127+
128+
// Restrict which files can be imported in a given folder
129+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
130+
'import/no-restricted-paths': 0,
127131
},
128132
};

0 commit comments

Comments
 (0)