@zendeskgarden/eslint-config 44.0.1 → 46.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 +19 -20
- package/plugins/jest.js +2 -0
- package/plugins/node.js +2 -0
- package/plugins/react.js +1 -3
- package/plugins/typescript-type-checked.js +8 -0
- package/rules/possible-problems.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": "46.0.0",
|
|
4
4
|
"description": "Garden ESLint config",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -24,32 +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
|
-
"
|
|
29
|
-
"eslint-plugin-
|
|
30
|
-
"eslint-plugin-
|
|
31
|
-
"eslint-plugin-n": "17.10.2",
|
|
27
|
+
"@babel/eslint-parser": "7.28.0",
|
|
28
|
+
"eslint-plugin-jest": "29.0.1",
|
|
29
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
30
|
+
"eslint-plugin-n": "17.21.3",
|
|
32
31
|
"eslint-plugin-notice": "1.0.0",
|
|
33
|
-
"eslint-plugin-react": "7.
|
|
34
|
-
"eslint-plugin-react-hooks": "
|
|
35
|
-
"globals": "
|
|
36
|
-
"typescript-eslint": "8.
|
|
32
|
+
"eslint-plugin-react": "7.37.5",
|
|
33
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
34
|
+
"globals": "16.3.0",
|
|
35
|
+
"typescript-eslint": "8.41.0"
|
|
37
36
|
},
|
|
38
37
|
"peerDependencies": {
|
|
39
38
|
"eslint": "^9.0.0"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@babel/core": "7.
|
|
43
|
-
"@eslint/config-inspector": "
|
|
44
|
-
"@zendeskgarden/scripts": "2.4.
|
|
45
|
-
"commit-and-tag-version": "12.
|
|
46
|
-
"envalid": "8.
|
|
47
|
-
"eslint": "9.
|
|
48
|
-
"husky": "9.1.
|
|
49
|
-
"jest": "
|
|
41
|
+
"@babel/core": "7.28.3",
|
|
42
|
+
"@eslint/config-inspector": "1.2.0",
|
|
43
|
+
"@zendeskgarden/scripts": "2.4.3",
|
|
44
|
+
"commit-and-tag-version": "12.6.0",
|
|
45
|
+
"envalid": "8.1.0",
|
|
46
|
+
"eslint": "9.34.0",
|
|
47
|
+
"husky": "9.1.7",
|
|
48
|
+
"jest": "30.1.1",
|
|
50
49
|
"prettier-package-json": "2.8.0",
|
|
51
|
-
"react": "
|
|
52
|
-
"typescript": "5.
|
|
50
|
+
"react": "19.1.1",
|
|
51
|
+
"typescript": "5.9.2"
|
|
53
52
|
},
|
|
54
53
|
"keywords": [
|
|
55
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
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { fixupPluginRules } from '@eslint/compat';
|
|
9
8
|
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
|
|
10
9
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
11
10
|
import reactPlugin from 'eslint-plugin-react';
|
|
@@ -13,8 +12,7 @@ import reactPlugin from 'eslint-plugin-react';
|
|
|
13
12
|
export default {
|
|
14
13
|
plugins: {
|
|
15
14
|
react: reactPlugin,
|
|
16
|
-
|
|
17
|
-
'react-hooks': fixupPluginRules(reactHooksPlugin),
|
|
15
|
+
'react-hooks': reactHooksPlugin,
|
|
18
16
|
'jsx-a11y': jsxA11yPlugin
|
|
19
17
|
},
|
|
20
18
|
languageOptions: {
|
|
@@ -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
|
|
@@ -113,6 +117,8 @@ export default {
|
|
|
113
117
|
'@typescript-eslint/no-unsafe-member-access': 2,
|
|
114
118
|
// disallows returning any from a function
|
|
115
119
|
'@typescript-eslint/no-unsafe-return': 2,
|
|
120
|
+
// disallow type assertions that narrow a type
|
|
121
|
+
'@typescript-eslint/no-unsafe-type-assertion': 2,
|
|
116
122
|
// require unary negation to take a number
|
|
117
123
|
'@typescript-eslint/no-unsafe-unary-minus': 2,
|
|
118
124
|
// prefers a non-null assertion over explicit type cast when possible
|
|
@@ -147,6 +153,8 @@ export default {
|
|
|
147
153
|
'@typescript-eslint/prefer-string-starts-ends-with': 2,
|
|
148
154
|
// requires any function or method that returns a Promise to be marked async
|
|
149
155
|
'@typescript-eslint/promise-function-async': 2,
|
|
156
|
+
// enforce that `get()` types should be assignable to their equivalent `set()` type
|
|
157
|
+
'@typescript-eslint/related-getter-setter-pairs': 2,
|
|
150
158
|
// requires `Array#sort` calls to always provide a `compareFunction`
|
|
151
159
|
'@typescript-eslint/require-array-sort-compare': 1,
|
|
152
160
|
// disallow async functions which have no `await` expression
|
|
@@ -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
|