@zendeskgarden/eslint-config 45.0.0 → 47.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/index.js +1 -1
- package/package.json +16 -16
- package/plugins/jest.js +2 -0
- package/plugins/node.js +2 -0
- package/plugins/react.js +5 -2
- package/plugins/typescript-type-checked.js +4 -0
- package/plugins/typescript.js +0 -4
- package/rules/possible-problems.js +2 -0
- package/rules/suggestions.js +2 -0
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "47.0.0",
|
|
4
4
|
"description": "Garden ESLint config",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -24,31 +24,31 @@
|
|
|
24
24
|
"test": "npm run format && npm run lint && git diff --quiet"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@babel/eslint-parser": "7.
|
|
28
|
-
"eslint-plugin-jest": "
|
|
27
|
+
"@babel/eslint-parser": "7.28.5",
|
|
28
|
+
"eslint-plugin-jest": "29.0.1",
|
|
29
29
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
30
|
-
"eslint-plugin-n": "17.
|
|
30
|
+
"eslint-plugin-n": "17.23.1",
|
|
31
31
|
"eslint-plugin-notice": "1.0.0",
|
|
32
|
-
"eslint-plugin-react": "7.37.
|
|
33
|
-
"eslint-plugin-react-hooks": "
|
|
34
|
-
"globals": "
|
|
35
|
-
"typescript-eslint": "8.
|
|
32
|
+
"eslint-plugin-react": "7.37.5",
|
|
33
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
34
|
+
"globals": "16.4.0",
|
|
35
|
+
"typescript-eslint": "8.46.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"eslint": "^9.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "7.
|
|
42
|
-
"@eslint/config-inspector": "
|
|
41
|
+
"@babel/core": "7.28.5",
|
|
42
|
+
"@eslint/config-inspector": "1.3.0",
|
|
43
43
|
"@zendeskgarden/scripts": "2.4.3",
|
|
44
|
-
"commit-and-tag-version": "12.
|
|
45
|
-
"envalid": "8.
|
|
46
|
-
"eslint": "9.
|
|
44
|
+
"commit-and-tag-version": "12.6.0",
|
|
45
|
+
"envalid": "8.1.0",
|
|
46
|
+
"eslint": "9.38.0",
|
|
47
47
|
"husky": "9.1.7",
|
|
48
|
-
"jest": "
|
|
48
|
+
"jest": "30.2.0",
|
|
49
49
|
"prettier-package-json": "2.8.0",
|
|
50
|
-
"react": "19.
|
|
51
|
-
"typescript": "5.
|
|
50
|
+
"react": "19.2.0",
|
|
51
|
+
"typescript": "5.9.3"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"eslint",
|
package/plugins/jest.js
CHANGED
|
@@ -76,6 +76,8 @@ export default {
|
|
|
76
76
|
'jest/prefer-comparison-matcher': 2,
|
|
77
77
|
// prefer using `.each` rather than manual loops
|
|
78
78
|
'jest/prefer-each': 2,
|
|
79
|
+
// prefer having the last statement in a test be an assertion
|
|
80
|
+
'jest/prefer-ending-with-an-expect': 0,
|
|
79
81
|
// suggest using the built-in equality matchers
|
|
80
82
|
'jest/prefer-equality-matcher': 2,
|
|
81
83
|
// suggest using `expect.assertions()` OR `expect.hasAssertions()`
|
package/plugins/node.js
CHANGED
|
@@ -58,6 +58,8 @@ export default {
|
|
|
58
58
|
'n/no-restricted-require': 0,
|
|
59
59
|
// disallow use of synchronous methods
|
|
60
60
|
'n/no-sync': 0,
|
|
61
|
+
// disallow top-level `await` in published modules
|
|
62
|
+
'n/no-top-level-await': 2,
|
|
61
63
|
// disallow `bin` files that npm ignores
|
|
62
64
|
'n/no-unpublished-bin': 2,
|
|
63
65
|
// disallow `import` declarations which import private modules
|
package/plugins/react.js
CHANGED
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
rules: {
|
|
31
|
-
...jsxA11yPlugin.
|
|
31
|
+
...jsxA11yPlugin.flatConfigs.recommended.rules,
|
|
32
32
|
// disallow `aria-hidden="true"` from being set on focusable elements
|
|
33
33
|
'jsx-a11y/no-aria-hidden-on-focusable': 2,
|
|
34
34
|
// enforces using semantic DOM elements over the ARIA role property.
|
|
@@ -119,7 +119,10 @@ export default {
|
|
|
119
119
|
// enforce no duplicate props
|
|
120
120
|
'react/jsx-no-duplicate-props': 2,
|
|
121
121
|
// disallow problematic leaked values from being rendered
|
|
122
|
-
'react/jsx-no-leaked-render':
|
|
122
|
+
'react/jsx-no-leaked-render': [
|
|
123
|
+
2,
|
|
124
|
+
{ validStrategies: ['coerce', 'ternary'] }
|
|
125
|
+
],
|
|
123
126
|
// prevent using string literals in React component definition
|
|
124
127
|
'react/jsx-no-literals': 0,
|
|
125
128
|
// forbid `javascript:` URLs
|
|
@@ -82,6 +82,8 @@ export default {
|
|
|
82
82
|
'@typescript-eslint/no-meaningless-void-operator': 2,
|
|
83
83
|
// avoid using promises in places not designed to handle them
|
|
84
84
|
'@typescript-eslint/no-misused-promises': 2,
|
|
85
|
+
// disallow using the spread operator when it might cause unexpected behavior
|
|
86
|
+
'@typescript-eslint/no-misused-spread': 2,
|
|
85
87
|
// disallow enums from having both number and string members
|
|
86
88
|
'@typescript-eslint/no-mixed-enums': 2,
|
|
87
89
|
// disallow members of unions and intersections that do nothing or override type information
|
|
@@ -99,6 +101,8 @@ export default {
|
|
|
99
101
|
'@typescript-eslint/no-unnecessary-type-arguments': 2,
|
|
100
102
|
// warns if a type assertion does not change the type of an expression
|
|
101
103
|
'@typescript-eslint/no-unnecessary-type-assertion': 2,
|
|
104
|
+
// disallow conversion idioms when they do not change the type or value of the expression
|
|
105
|
+
'@typescript-eslint/no-unnecessary-type-conversion': 2,
|
|
102
106
|
// disallow type parameters that aren't used multiple times
|
|
103
107
|
'@typescript-eslint/no-unnecessary-type-parameters': 1,
|
|
104
108
|
// disallows calling an function with an any type value
|
package/plugins/typescript.js
CHANGED
|
@@ -196,12 +196,8 @@ export default {
|
|
|
196
196
|
'@typescript-eslint/prefer-literal-enum-member': 1,
|
|
197
197
|
// require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules
|
|
198
198
|
'@typescript-eslint/prefer-namespace-keyword': 2,
|
|
199
|
-
// enforce constituents of a type union/intersection to be sorted alphabetically
|
|
200
|
-
'@typescript-eslint/sort-type-constituents': 0,
|
|
201
199
|
// sets preference level for triple slash directives versus ES6-style import declarations
|
|
202
200
|
'@typescript-eslint/triple-slash-reference': 2,
|
|
203
|
-
// requires type annotations to exist
|
|
204
|
-
'@typescript-eslint/typedef': 2,
|
|
205
201
|
// warns for any two overloads that could be unified into one by using a union or an optional/rest parameter
|
|
206
202
|
'@typescript-eslint/unified-signatures': 2
|
|
207
203
|
}
|
|
@@ -91,6 +91,8 @@ export default {
|
|
|
91
91
|
'no-template-curly-in-string': 2,
|
|
92
92
|
// disallow to use `this`/`super` before `super()` calling in constructors
|
|
93
93
|
'no-this-before-super': 2,
|
|
94
|
+
// disallow `let` or `var` variables that are read but never assigned
|
|
95
|
+
'no-unassigned-vars': 2,
|
|
94
96
|
// disallow use of undeclared variables unless mentioned in a `/*global*/` block
|
|
95
97
|
'no-undef': 2,
|
|
96
98
|
// avoid code that looks like two expressions but is actually one
|
package/rules/suggestions.js
CHANGED
|
@@ -267,6 +267,8 @@ export default {
|
|
|
267
267
|
'prefer-spread': 1,
|
|
268
268
|
// suggest using template literals instead of strings concatenation
|
|
269
269
|
'prefer-template': 2,
|
|
270
|
+
// Disallow losing originally caught error when re-throwing custom errors
|
|
271
|
+
'preserve-caught-error': 1,
|
|
270
272
|
// require use of the second argument for `parseInt()`
|
|
271
273
|
radix: 2,
|
|
272
274
|
// disallow async functions which have no `await` expression
|