@wordpress/eslint-plugin 22.20.0 → 22.21.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.
package/configs/custom.js CHANGED
@@ -19,11 +19,7 @@ module.exports = {
19
19
  },
20
20
  },
21
21
  {
22
- files: [
23
- '*.test.js',
24
- '**/test/*.js',
25
- 'packages/e2e-test-utils/**/*.js',
26
- ],
22
+ files: [ '*.test.js', '**/test/*.js' ],
27
23
  rules: {
28
24
  '@wordpress/no-global-active-element': 'off',
29
25
  '@wordpress/no-global-get-selection': 'off',
@@ -22,6 +22,9 @@ const config = {
22
22
  settings: {
23
23
  'import/internal-regex': wpPackagesRegExp,
24
24
  'import/extensions': [ '.js', '.jsx' ],
25
+ 'import/resolver': {
26
+ typescript: true,
27
+ },
25
28
  },
26
29
  rules: {
27
30
  'import/no-extraneous-dependencies': [
@@ -37,7 +37,7 @@ if ( isPackageInstalled( 'prettier' ) ) {
37
37
  if ( isPackageInstalled( 'typescript' ) ) {
38
38
  config.settings = {
39
39
  'import/resolver': {
40
- node: {
40
+ typescript: {
41
41
  extensions: [ '.js', '.jsx', '.ts', '.tsx' ],
42
42
  },
43
43
  },
@@ -68,6 +68,12 @@ if ( isPackageInstalled( 'typescript' ) ) {
68
68
  'no-shadow': 'off',
69
69
  '@typescript-eslint/no-shadow': 'error',
70
70
  '@typescript-eslint/method-signature-style': 'error',
71
+ // TypeScript already checks for these types of issues, so don't
72
+ // waste time checking them again.
73
+ // See: https://typescript-eslint.io/troubleshooting/typed-linting/performance/
74
+ 'import/no-unresolved': 'off',
75
+ 'import/default': 'off',
76
+ 'import/named': 'off',
71
77
  },
72
78
  },
73
79
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/eslint-plugin",
3
- "version": "22.20.0",
3
+ "version": "22.21.0",
4
4
  "description": "ESLint plugin for WordPress development.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -40,10 +40,11 @@
40
40
  "@babel/eslint-parser": "7.25.7",
41
41
  "@typescript-eslint/eslint-plugin": "^6.4.1",
42
42
  "@typescript-eslint/parser": "^6.4.1",
43
- "@wordpress/babel-preset-default": "^8.34.0",
44
- "@wordpress/prettier-config": "^4.34.0",
43
+ "@wordpress/babel-preset-default": "^8.35.0",
44
+ "@wordpress/prettier-config": "^4.35.0",
45
45
  "cosmiconfig": "^7.0.0",
46
46
  "eslint-config-prettier": "^8.3.0",
47
+ "eslint-import-resolver-typescript": "^4.4.4",
47
48
  "eslint-plugin-import": "^2.25.2",
48
49
  "eslint-plugin-jest": "^27.4.3",
49
50
  "eslint-plugin-jsdoc": "^46.4.6",
@@ -72,5 +73,5 @@
72
73
  "publishConfig": {
73
74
  "access": "public"
74
75
  },
75
- "gitHead": "ceebff807958d2e8fc755b5a20473939c78b4d1d"
76
+ "gitHead": "77aa1f194edceafe8ac2a1b9438bf84b557e76e3"
76
77
  }