@wordpress/eslint-plugin 19.2.0 → 20.0.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.
@@ -55,11 +55,19 @@ if ( isPackageInstalled( 'typescript' ) ) {
55
55
  // Don't require redundant JSDoc types in TypeScript files.
56
56
  'jsdoc/require-param-type': 'off',
57
57
  'jsdoc/require-returns-type': 'off',
58
- // Handled by TS itself.
58
+ // Use eslint for unused variable and parameter detection.
59
+ // This overlaps with TypeScript noUnusedLocals and noUnusedParameters settings.
60
+ // TypeScript may only run on a subset of files. Prefer eslint which is more
61
+ // likely to run on the entire codebase.
59
62
  'no-unused-vars': 'off',
63
+ '@typescript-eslint/no-unused-vars': [
64
+ 'error',
65
+ { ignoreRestSiblings: true },
66
+ ],
60
67
  // no-shadow doesn't work correctly in TS, so let's use a TS-dedicated version instead.
61
68
  'no-shadow': 'off',
62
69
  '@typescript-eslint/no-shadow': 'error',
70
+ '@typescript-eslint/method-signature-style': 'error',
63
71
  },
64
72
  },
65
73
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/eslint-plugin",
3
- "version": "19.2.0",
3
+ "version": "20.0.0",
4
4
  "description": "ESLint plugin for WordPress development.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,8 +34,8 @@
34
34
  "@babel/eslint-parser": "^7.16.0",
35
35
  "@typescript-eslint/eslint-plugin": "^6.4.1",
36
36
  "@typescript-eslint/parser": "^6.4.1",
37
- "@wordpress/babel-preset-default": "^8.2.0",
38
- "@wordpress/prettier-config": "^4.2.0",
37
+ "@wordpress/babel-preset-default": "^8.3.0",
38
+ "@wordpress/prettier-config": "^4.3.0",
39
39
  "cosmiconfig": "^7.0.0",
40
40
  "eslint-config-prettier": "^8.3.0",
41
41
  "eslint-plugin-import": "^2.25.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "aa5b14bb5bdbb8d8a02914e154c3bc1c2f18ace6"
69
+ "gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
70
70
  }