Skip to content

Commit a12ac00

Browse files
authored
Packages: Fix all missing or obsolete dependencies in packages (#16969)
* Packages: Fix all missing or obsolete dependencies in packages * Enable import/no-extraneous-dependencies rule and fix reported violations * Remove 2 dependencies not used in the project on the global level * Remove unused @wordpress/core-data dependnecy from @wordpress/block-editor
1 parent 6402f95 commit a12ac00

File tree

19 files changed

+280
-42
lines changed

19 files changed

+280
-42
lines changed

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = {
2222
'plugin:@wordpress/eslint-plugin/recommended',
2323
'plugin:jest/recommended',
2424
],
25+
plugins: [
26+
'import',
27+
],
2528
rules: {
2629
'@wordpress/react-no-unsafe-timeout': 'error',
2730
'no-restricted-syntax': [
@@ -106,6 +109,16 @@ module.exports = {
106109
} ],
107110
},
108111
overrides: [
112+
{
113+
files: [ 'packages/**/*.js' ],
114+
rules: {
115+
'import/no-extraneous-dependencies': 'error',
116+
},
117+
excludedFiles: [
118+
'**/*.@(android|ios|native).js',
119+
'**/@(benchmark|test|__tests__)/**/*.js',
120+
],
121+
},
109122
{
110123
files: [ 'packages/e2e-test*/**/*.js' ],
111124
env: {

0 commit comments

Comments
 (0)