Skip to content

Commit 5a32c33

Browse files
1peteljharb
authored andcommitted
[eslint config] [base] [minor] enable import/no-useless-path-segments for commonjs
Fixes airbnb#2077.
1 parent df2c99c commit 5a32c33

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ module.exports = {
236236

237237
// Ensures that there are no useless path segments
238238
// https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md
239-
'import/no-useless-path-segments': 'error',
239+
'import/no-useless-path-segments': ['error', { "commonjs": true }],
240240

241241
// dynamic imports require a leading comment with a webpackChunkName
242242
// https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md

0 commit comments

Comments
 (0)