Skip to content

Commit e6b39e9

Browse files
committed
Update .eslintrc.js
1 parent 37bf676 commit e6b39e9

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.eslintrc.js

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
module.exports = {
2-
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
3-
rules: {
4-
'import/no-unresolved': [
5-
'error',
6-
{
7-
ignore: [ '^@wordpress/' ],
8-
},
9-
],
10-
},
11-
};
2+
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
3+
rules: {
4+
// WordPress provides these as externals
5+
'import/no-unresolved': [
6+
'error',
7+
{
8+
ignore: [ '^@wordpress/' ],
9+
},
10+
],
11+
12+
// Do NOT require @wordpress/* to be installed
13+
'import/no-extraneous-dependencies': [
14+
'error',
15+
{
16+
optionalDependencies: [ '@wordpress/*' ],
17+
},
18+
],
19+
},
20+
};

0 commit comments

Comments
 (0)