@automattic/eslint-plugin-wpvip 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -134,6 +134,22 @@ module.exports = {
134
134
  'import/no-unresolved': 'error',
135
135
  'unused-imports/no-unused-imports': 'warn',
136
136
 
137
+ // Enforce external / internal import groups and alphabetical ordering.
138
+ 'import/order': [
139
+ 'error',
140
+ {
141
+ 'newlines-between': 'always',
142
+ alphabetize: {
143
+ order: 'asc',
144
+ },
145
+ groups: [
146
+ [ 'builtin', 'external' ],
147
+ [ 'index', 'internal', 'object', 'parent', 'sibling' ],
148
+ [ 'type' ],
149
+ ],
150
+ },
151
+ ],
152
+
137
153
  // Enforce Unix linebreaks. Included here and not in "formatting" since it
138
154
  // is not controversial and helps with interchange.
139
155
  'linebreak-style': [ 'error', 'unix' ],
@@ -217,7 +233,6 @@ module.exports = {
217
233
  'promise/avoid-new': 'off',
218
234
  'promise/catch-or-return': 'off',
219
235
  'promise/no-callback-in-promise': 'warn',
220
- 'promise/no-multiple-resolved': 'error',
221
236
  'promise/no-native': 'off',
222
237
  'promise/no-nesting': 'warn',
223
238
  'promise/no-new-statics': 'error',
@@ -228,6 +243,11 @@ module.exports = {
228
243
  'promise/prefer-await-to-callbacks': 'off',
229
244
  'promise/prefer-await-to-then': 'off',
230
245
  'promise/valid-params': 'error',
246
+
247
+ // This rule has been disabled because it is extremely slow:
248
+ // https://github.com/Automattic/vip-cli/pull/1534
249
+ //
250
+ // 'promise/no-multiple-resolved': 'error',
231
251
  },
232
252
 
233
253
  settings: {
@@ -53,12 +53,16 @@ module.exports = {
53
53
 
54
54
  radix: 'warn',
55
55
 
56
- 'promise/no-multiple-resolved': 'warn',
57
56
  'promise/no-new-statics': 'warn',
58
57
  'promise/no-return-in-finally': 'warn',
59
58
  'promise/no-return-wrap': 'warn',
60
59
  'promise/param-names': 'warn',
61
60
  'promise/valid-params': 'warn',
61
+
62
+ // This rule has been disabled because it is extremely slow:
63
+ // https://github.com/Automattic/vip-cli/pull/1534
64
+ //
65
+ // 'promise/no-multiple-resolved': 'warn',
62
66
  },
63
67
  },
64
68
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/eslint-plugin-wpvip",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "ESLint plugin for internal WordPress VIP projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,37 +32,37 @@
32
32
  },
33
33
  "homepage": "https://github.com/Automattic/eslint-config-wpvip#readme",
34
34
  "dependencies": {
35
- "@babel/eslint-parser": "7.22.10",
36
- "@rushstack/eslint-patch": "1.3.3",
37
- "@typescript-eslint/eslint-plugin": "^6.0.0",
38
- "@typescript-eslint/parser": "^6.0.0",
35
+ "@babel/eslint-parser": "7.22.15",
36
+ "@rushstack/eslint-patch": "1.5.1",
37
+ "@typescript-eslint/eslint-plugin": "6.9.1",
38
+ "@typescript-eslint/parser": "6.9.1",
39
39
  "eslint-config-prettier": "8.7.0",
40
- "eslint-import-resolver-typescript": "3.5.3",
41
- "eslint-plugin-import": "2.28.1",
42
- "eslint-plugin-jest": "27.2.3",
43
- "eslint-plugin-jsdoc": "40.0.2",
40
+ "eslint-import-resolver-typescript": "3.6.1",
41
+ "eslint-plugin-import": "2.29.0",
42
+ "eslint-plugin-jest": "27.6.0",
43
+ "eslint-plugin-jsdoc": "46.8.2",
44
44
  "eslint-plugin-json": "3.1.0",
45
45
  "eslint-plugin-jsx-a11y": "6.7.1",
46
46
  "eslint-plugin-prettier": "4.2.1",
47
47
  "eslint-plugin-promise": "6.1.1",
48
- "eslint-plugin-react": "7.32.2",
48
+ "eslint-plugin-react": "7.33.2",
49
49
  "eslint-plugin-react-hooks": "4.6.0",
50
50
  "eslint-plugin-security": "1.7.1",
51
51
  "eslint-plugin-unused-imports": "3.0.0",
52
52
  "find-package-json": "1.2.0",
53
- "globals": "13.20.0"
53
+ "globals": "13.23.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "eslint": ">=8"
57
57
  },
58
58
  "devDependencies": {
59
- "@tsconfig/node18": "1.0.1",
60
- "@types/eslint": "8.44.2",
61
- "@types/jest": "29.5.0",
62
- "eslint": "8.47.0",
63
- "jest": "29.5.0",
59
+ "@tsconfig/node18": "18.2.2",
60
+ "@types/eslint": "8.44.6",
61
+ "@types/jest": "29.5.7",
62
+ "eslint": "8.52.0",
63
+ "jest": "29.7.0",
64
64
  "prettier": "npm:wp-prettier@2.8.5",
65
- "ts-jest": "29.0.5",
66
- "typescript": "4.9.5"
65
+ "ts-jest": "29.1.1",
66
+ "typescript": "5.2.2"
67
67
  }
68
68
  }
@@ -1,6 +1,13 @@
1
- const debugLog = require( './debug-log' );
1
+ /**
2
+ * External dependencies
3
+ */
2
4
  const findPackageJson = require( 'find-package-json' );
3
5
 
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ const debugLog = require( './debug-log' );
10
+
4
11
  // Get a list of all package.json files in the current directory tree, ascending
5
12
  // up the tree from the current directory. Note that this code behaves differently
6
13
  // when it is installed as a package vs. when we are linting the code in this repo.