@zendeskgarden/eslint-config 41.0.0 → 43.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.
- package/package.json +17 -12
- package/plugins/jest.js +2 -0
- package/plugins/node.js +1 -1
- package/plugins/typescript-type-checked.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "43.0.0",
|
|
4
4
|
"description": "Garden ESLint config",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -19,27 +19,32 @@
|
|
|
19
19
|
"format": "prettier-package-json --write",
|
|
20
20
|
"lint": "eslint eslint.config.js index.js plugins/*.js rules/*.js --max-warnings 0",
|
|
21
21
|
"prepare": "husky",
|
|
22
|
+
"start": "npm exec @eslint/config-inspector",
|
|
22
23
|
"tag": "[ `git rev-parse --abbrev-ref HEAD` = 'main' ] && standard-version --no-verify",
|
|
23
24
|
"test": "npm run format && npm run lint && git diff --quiet"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@babel/eslint-parser": "7.24.
|
|
27
|
-
"@eslint/compat": "1.0
|
|
28
|
-
"eslint-plugin-
|
|
29
|
-
"eslint-plugin-
|
|
30
|
-
"eslint-plugin-
|
|
31
|
-
"eslint-plugin-
|
|
32
|
-
"eslint-plugin-
|
|
27
|
+
"@babel/eslint-parser": "7.24.7",
|
|
28
|
+
"@eslint/compat": "1.1.0",
|
|
29
|
+
"eslint-plugin-deprecation": "3.0.0",
|
|
30
|
+
"eslint-plugin-jest": "28.6.0",
|
|
31
|
+
"eslint-plugin-jsx-a11y": "6.9.0",
|
|
32
|
+
"eslint-plugin-n": "17.9.0",
|
|
33
|
+
"eslint-plugin-notice": "1.0.0",
|
|
34
|
+
"eslint-plugin-react": "7.34.3",
|
|
33
35
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
34
|
-
"globals": "15.
|
|
35
|
-
"typescript-eslint": "7.
|
|
36
|
+
"globals": "15.6.0",
|
|
37
|
+
"typescript-eslint": "7.13.1"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
40
|
"eslint": "^9.0.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "7.24.
|
|
42
|
-
"eslint": "
|
|
43
|
+
"@babel/core": "7.24.7",
|
|
44
|
+
"@eslint/config-inspector": "0.5.0",
|
|
45
|
+
"@zendeskgarden/scripts": "2.3.0",
|
|
46
|
+
"envalid": "8.0.0",
|
|
47
|
+
"eslint": "9.5.0",
|
|
43
48
|
"husky": "9.0.11",
|
|
44
49
|
"jest": "29.7.0",
|
|
45
50
|
"prettier-package-json": "2.8.0",
|
package/plugins/jest.js
CHANGED
|
@@ -88,6 +88,8 @@ export default {
|
|
|
88
88
|
'jest/prefer-hooks-on-top': 0,
|
|
89
89
|
// prefer importing Jest globals
|
|
90
90
|
'jest/prefer-importing-jest-globals': 0,
|
|
91
|
+
// prefer `jest.mocked()` over `fn as jest.Mock`
|
|
92
|
+
'jest/prefer-jest-mocked': 2,
|
|
91
93
|
// enforce lowercase test names
|
|
92
94
|
'jest/prefer-lowercase-title': [1, { ignore: ['describe'] }],
|
|
93
95
|
// prefer mock resolved/rejected shorthands for promises
|
package/plugins/node.js
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
// disallow `require()` expressions which import extraneous modules
|
|
40
40
|
'n/no-extraneous-require': 0,
|
|
41
41
|
// disallow `import` declarations which import non-existence modules
|
|
42
|
-
'n/no-missing-import':
|
|
42
|
+
'n/no-missing-import': 0,
|
|
43
43
|
// disallow `require()` expressions which import non-existence modules
|
|
44
44
|
'n/no-missing-require': 2,
|
|
45
45
|
// disallow mixing regular variable and `require` declarations
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import deprecationPlugin from 'eslint-plugin-deprecation';
|
|
8
9
|
import eslintLayoutFormatting from '../rules/layout-formatting.js';
|
|
9
10
|
import eslintPossibleProblems from '../rules/possible-problems.js';
|
|
10
11
|
import eslintSuggestions from '../rules/suggestions.js';
|
|
12
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
11
13
|
import tseslint from 'typescript-eslint';
|
|
12
14
|
|
|
13
15
|
const eslintRules = {
|
|
@@ -18,7 +20,8 @@ const eslintRules = {
|
|
|
18
20
|
|
|
19
21
|
export default {
|
|
20
22
|
plugins: {
|
|
21
|
-
'@typescript-eslint': tseslint.plugin
|
|
23
|
+
'@typescript-eslint': tseslint.plugin,
|
|
24
|
+
deprecation: fixupPluginRules(deprecationPlugin)
|
|
22
25
|
},
|
|
23
26
|
languageOptions: {
|
|
24
27
|
parser: tseslint.parser,
|
|
@@ -160,6 +163,8 @@ export default {
|
|
|
160
163
|
// enforces unbound methods are called with their expected scope
|
|
161
164
|
'@typescript-eslint/unbound-method': 2,
|
|
162
165
|
// requires type annotation of catch() parameter remain unknown
|
|
163
|
-
'@typescript-eslint/use-unknown-in-catch-callback-variable': 2
|
|
166
|
+
'@typescript-eslint/use-unknown-in-catch-callback-variable': 2,
|
|
167
|
+
// disallow usage of deprecated APIs
|
|
168
|
+
'deprecation/deprecation': 'warn'
|
|
164
169
|
}
|
|
165
170
|
};
|