Skip to content

Commit

Permalink
ESLint: fixup the configuration of the import/no-extraneous-modules
Browse files Browse the repository at this point in the history
Don't specify a `packageDir` and make it look at the closest `package.json` by default.

Also, add `lodash` as a top-level dev dependency, as some build-only files (e.g., `.eslintrc`)
use it.
  • Loading branch information
jsnajdr committed Jan 15, 2020
1 parent 999c704 commit 8a731bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,6 @@ module.exports = {

// Disallow importing or requiring packages that are not listed in package.json
// This prevents us from depending on transitive dependencies, which could break in unexpected ways.
'import/no-extraneous-dependencies': [ 'error', { packageDir: './' } ],
'import/no-extraneous-dependencies': 'error',
},
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
"jest-junit": "9.0.0",
"lerna": "3.18.4",
"loader-utils": "1.2.3",
"lodash": "4.17.15",
"md5-file": "4.0.0",
"mixedindentlint": "1.2.0",
"mkdirp": "0.5.1",
Expand Down

0 comments on commit 8a731bc

Please sign in to comment.