@zendeskgarden/eslint-config 26.0.0 → 28.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/eslint-config",
3
- "version": "26.0.0",
3
+ "version": "28.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.1.0",
26
+ "eslint": "^8.5.0",
27
27
  "eslint-plugin-node": "^11.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@babel/eslint-parser": "7.16.3",
31
- "@typescript-eslint/eslint-plugin": "5.4.0",
32
- "@typescript-eslint/parser": "5.4.0",
33
- "eslint": "8.2.0",
34
- "eslint-plugin-jest": "25.2.4",
30
+ "@babel/eslint-parser": "7.17.0",
31
+ "@typescript-eslint/eslint-plugin": "5.18.0",
32
+ "@typescript-eslint/parser": "5.18.0",
33
+ "eslint": "8.12.0",
34
+ "eslint-plugin-jest": "26.1.3",
35
35
  "eslint-plugin-jsx-a11y": "6.5.1",
36
36
  "eslint-plugin-node": "11.1.0",
37
37
  "eslint-plugin-notice": "0.9.10",
38
- "eslint-plugin-react": "7.27.0",
39
- "eslint-plugin-react-hooks": "4.3.0",
38
+ "eslint-plugin-react": "7.29.4",
39
+ "eslint-plugin-react-hooks": "4.4.0",
40
40
  "husky": "7.0.4",
41
- "jest": "27.3.1",
42
- "prettier-package-json": "2.6.0",
41
+ "jest": "27.5.1",
42
+ "prettier-package-json": "2.6.3",
43
43
  "react": "17.0.2",
44
44
  "standard-version": "9.3.2",
45
- "typescript": "4.5.2"
45
+ "typescript": "4.6.3"
46
46
  },
47
47
  "keywords": [
48
48
  "eslint",
package/plugins/jest.js CHANGED
@@ -19,6 +19,8 @@ module.exports = {
19
19
  'jest/no-commented-out-tests': 2,
20
20
  // prevent calling `expect` conditionally
21
21
  'jest/no-conditional-expect': 0,
22
+ // disallow conditionals in test
23
+ 'jest/no-conditional-in-test': 0,
22
24
  // disallow use of deprecated functions
23
25
  'jest/no-deprecated-functions': 2,
24
26
  // disallow disabled tests
@@ -35,8 +37,6 @@ module.exports = {
35
37
  'jest/no-hooks': 0,
36
38
  // disallow identical titles
37
39
  'jest/no-identical-title': 2,
38
- // disallow conditional logic
39
- 'jest/no-if': 0,
40
40
  // disallow string interpolation inside snapshots
41
41
  'jest/no-interpolation-in-snapshots': 2,
42
42
  // disallow Jasmine globals
@@ -65,6 +65,8 @@ module.exports = {
65
65
  'jest/prefer-hooks-on-top': 0,
66
66
  // enforce lowercase test names
67
67
  'jest/prefer-lowercase-title': [1, { ignore: ['describe'] }],
68
+ // suggest having a hint for snapshots
69
+ 'jest/prefer-snapshot-hint': 1,
68
70
  // suggest using `jest.spyOn()`
69
71
  'jest/prefer-spy-on': 0,
70
72
  // suggest using `toStrictEqual()`
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
@@ -134,7 +134,7 @@ module.exports = {
134
134
  },
135
135
  {
136
136
  selector: 'objectLiteralProperty',
137
- format: ['camelCase', 'snake_case', 'PascalCase', 'UPPER_CASE']
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
@@ -191,6 +191,8 @@ module.exports = {
191
191
  }],
192
192
  // disallow the use of `Math.pow` in favor of the `**` operator
193
193
  'prefer-exponentiation-operator': 1,
194
+ // disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`
195
+ 'prefer-object-has-own': 1,
194
196
  // prefer use of an object spread over `Object.assign`
195
197
  'prefer-object-spread': 1,
196
198
  // require quotes around object literal property names