@zendeskgarden/eslint-config 27.0.1 → 29.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 +16 -16
- package/plugins/jest.js +2 -2
- package/plugins/react.js +4 -0
- package/plugins/typescript-semantics.js +2 -0
- package/plugins/typescript.js +3 -1
- package/rules/stylistic-issues.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "29.0.0",
|
|
4
4
|
"description": "Garden ESLint config",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@babel/eslint-parser": "^7.15.0",
|
|
26
|
-
"eslint": "^8.
|
|
26
|
+
"eslint": "^8.24.0",
|
|
27
27
|
"eslint-plugin-node": "^11.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@babel/eslint-parser": "7.
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
32
|
-
"@typescript-eslint/parser": "5.
|
|
33
|
-
"eslint": "8.
|
|
34
|
-
"eslint-plugin-jest": "
|
|
35
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
30
|
+
"@babel/eslint-parser": "7.19.1",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "5.38.0",
|
|
32
|
+
"@typescript-eslint/parser": "5.38.0",
|
|
33
|
+
"eslint": "8.24.0",
|
|
34
|
+
"eslint-plugin-jest": "27.1.1",
|
|
35
|
+
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
36
36
|
"eslint-plugin-node": "11.1.0",
|
|
37
37
|
"eslint-plugin-notice": "0.9.10",
|
|
38
|
-
"eslint-plugin-react": "7.
|
|
39
|
-
"eslint-plugin-react-hooks": "4.
|
|
40
|
-
"husky": "
|
|
41
|
-
"jest": "
|
|
42
|
-
"prettier-package-json": "2.
|
|
43
|
-
"react": "
|
|
44
|
-
"standard-version": "9.
|
|
45
|
-
"typescript": "4.
|
|
38
|
+
"eslint-plugin-react": "7.31.8",
|
|
39
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
40
|
+
"husky": "8.0.1",
|
|
41
|
+
"jest": "29.1.2",
|
|
42
|
+
"prettier-package-json": "2.7.0",
|
|
43
|
+
"react": "18.2.0",
|
|
44
|
+
"standard-version": "9.5.0",
|
|
45
|
+
"typescript": "4.8.3"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"eslint",
|
package/plugins/jest.js
CHANGED
|
@@ -41,8 +41,6 @@ module.exports = {
|
|
|
41
41
|
'jest/no-interpolation-in-snapshots': 2,
|
|
42
42
|
// disallow Jasmine globals
|
|
43
43
|
'jest/no-jasmine-globals': 2,
|
|
44
|
-
// disallow importing Jest
|
|
45
|
-
'jest/no-jest-import': 2,
|
|
46
44
|
// disallow large snapshots
|
|
47
45
|
'jest/no-large-snapshots': 0,
|
|
48
46
|
// disallow manually importing from `__mocks__`
|
|
@@ -57,6 +55,8 @@ module.exports = {
|
|
|
57
55
|
'jest/no-test-return-statement': 2,
|
|
58
56
|
// suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
59
57
|
'jest/prefer-called-with': 0,
|
|
58
|
+
// prefer using `.each` rather than manual loops
|
|
59
|
+
'jest/prefer-each': 2,
|
|
60
60
|
// suggest using `expect.assertions()` OR `expect.hasAssertions()`
|
|
61
61
|
'jest/prefer-expect-assertions': 0,
|
|
62
62
|
// suggest `await expect(...).resolves` over `expect(await ...)` syntax
|
package/plugins/react.js
CHANGED
|
@@ -44,6 +44,10 @@ module.exports = {
|
|
|
44
44
|
1,
|
|
45
45
|
{ namedComponents: 'arrow-function' }
|
|
46
46
|
],
|
|
47
|
+
// ensure destructuring and symmetric naming of useState hook value and setter variables
|
|
48
|
+
'react/hook-use-state': 1,
|
|
49
|
+
// enforce sandbox attribute on iframe elements
|
|
50
|
+
'react/iframe-missing-sandbox': 2,
|
|
47
51
|
// enforce boolean attributes notation in JSX
|
|
48
52
|
'react/jsx-boolean-value': 1,
|
|
49
53
|
// ensures inline tags are not rendered without spaces between them
|
|
@@ -35,6 +35,8 @@ module.exports = {
|
|
|
35
35
|
'@typescript-eslint/no-implied-eval': bestPractices['no-implied-eval'],
|
|
36
36
|
// avoid using promises in places not designed to handle them
|
|
37
37
|
'@typescript-eslint/no-misused-promises': 2,
|
|
38
|
+
// disallow members of unions and intersections that do nothing or override type information
|
|
39
|
+
'@typescript-eslint/no-redundant-type-constituents': 2,
|
|
38
40
|
// disallow throwing literals as exceptions
|
|
39
41
|
'@typescript-eslint/no-throw-literal': bestPractices['no-throw-literal'],
|
|
40
42
|
// flags unnecessary equality comparisons against boolean literals
|
package/plugins/typescript.js
CHANGED
|
@@ -134,7 +134,7 @@ module.exports = {
|
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
selector: 'objectLiteralProperty',
|
|
137
|
-
format:
|
|
137
|
+
format: null
|
|
138
138
|
}
|
|
139
139
|
],
|
|
140
140
|
// disallow generic `Array` constructors
|
|
@@ -211,6 +211,8 @@ module.exports = {
|
|
|
211
211
|
// disallow the use of variables before they are defined
|
|
212
212
|
'@typescript-eslint/no-use-before-define':
|
|
213
213
|
variables['no-use-before-define'],
|
|
214
|
+
// disallow unnecessary empty export
|
|
215
|
+
'@typescript-eslint/no-useless-empty-export': 2,
|
|
214
216
|
// disallow unnecessary constructors
|
|
215
217
|
'@typescript-eslint/no-useless-constructor': es6['no-useless-constructor'],
|
|
216
218
|
// disallows the use of require statements except in import statements
|
|
@@ -75,6 +75,8 @@ module.exports = {
|
|
|
75
75
|
'lines-around-comment': 0,
|
|
76
76
|
// require or disallow an empty line between class members
|
|
77
77
|
'lines-between-class-members': 2,
|
|
78
|
+
// require or disallow logical assignment logical operator shorthand
|
|
79
|
+
'logical-assignment-operators': 2,
|
|
78
80
|
// specify the maximum depth that blocks can be nested
|
|
79
81
|
'max-depth': [0, 4],
|
|
80
82
|
// specify the maximum length of a line in your program
|