@zendeskgarden/eslint-config 33.0.0 → 35.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": "33.0.0",
3
+ "version": "35.0.0",
4
4
  "description": "Garden ESLint config",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -16,34 +16,34 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "format": "prettier-package-json --write",
19
- "lint": "eslint index.js plugins/*.js rules/*.js",
19
+ "lint": "eslint index.js plugins/*.js rules/*.js --max-warnings 0",
20
20
  "prepare": "husky install",
21
21
  "tag": "[ `git rev-parse --abbrev-ref HEAD` = 'main' ] && standard-version --no-verify",
22
- "test": "yarn lint && yarn format && git diff --quiet"
22
+ "test": "npm run format && npm run lint && git diff --quiet"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@babel/eslint-parser": "^7.15.0",
26
- "eslint": "^8.29.0",
26
+ "eslint": "^8.50.0",
27
27
  "eslint-plugin-node": "^11.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@babel/core": "7.22.8",
31
- "@babel/eslint-parser": "7.22.7",
32
- "@typescript-eslint/eslint-plugin": "5.61.0",
33
- "@typescript-eslint/parser": "5.61.0",
34
- "eslint": "8.44.0",
35
- "eslint-plugin-jest": "27.2.2",
30
+ "@babel/core": "7.23.0",
31
+ "@babel/eslint-parser": "7.22.15",
32
+ "@typescript-eslint/eslint-plugin": "6.7.2",
33
+ "@typescript-eslint/parser": "6.7.2",
34
+ "eslint": "8.50.0",
35
+ "eslint-plugin-jest": "27.4.0",
36
36
  "eslint-plugin-jsx-a11y": "6.7.1",
37
37
  "eslint-plugin-node": "11.1.0",
38
38
  "eslint-plugin-notice": "0.9.10",
39
- "eslint-plugin-react": "7.32.2",
39
+ "eslint-plugin-react": "7.33.2",
40
40
  "eslint-plugin-react-hooks": "4.6.0",
41
41
  "husky": "8.0.3",
42
- "jest": "29.6.1",
42
+ "jest": "29.7.0",
43
43
  "prettier-package-json": "2.8.0",
44
44
  "react": "18.2.0",
45
45
  "standard-version": "9.5.0",
46
- "typescript": "5.1.6"
46
+ "typescript": "5.2.2"
47
47
  },
48
48
  "keywords": [
49
49
  "eslint",
@@ -17,7 +17,6 @@ module.exports = {
17
17
  'dot-notation': 0,
18
18
  'key-spacing': 0,
19
19
  'no-implied-eval': 0,
20
- 'no-return-await': 0,
21
20
  'no-throw-literal': 0,
22
21
  'require-await': 0,
23
22
 
@@ -96,8 +95,6 @@ module.exports = {
96
95
  '@typescript-eslint/restrict-plus-operands': 2,
97
96
  // enforce template literal expressions to be of string type
98
97
  '@typescript-eslint/restrict-template-expressions': 2,
99
- // enforces consistent returning of awaited values
100
- '@typescript-eslint/return-await': bestPractices['no-return-await'],
101
98
  // restricts the types allowed in boolean expressions
102
99
  '@typescript-eslint/strict-boolean-expressions': 1,
103
100
  // exhaustiveness checking in switch with union type
@@ -17,6 +17,7 @@ module.exports = {
17
17
  rules: {
18
18
  // Disable ESLint rules that are handled by TypeScript
19
19
  'brace-style': 0,
20
+ 'class-methods-use-this': 0,
20
21
  'comma-dangle': 0,
21
22
  'comma-spacing': 0,
22
23
  'constructor-super': 0,
@@ -32,7 +33,6 @@ module.exports = {
32
33
  'no-dupe-args': 0,
33
34
  'no-dupe-class-members': 0,
34
35
  'no-dupe-keys': 0,
35
- 'no-duplicate-imports': 0,
36
36
  'no-empty-function': 0,
37
37
  'no-extra-parens': 0,
38
38
  'no-extra-semi': 0,
@@ -77,6 +77,9 @@ module.exports = {
77
77
  '@typescript-eslint/brace-style': stylisticIssues['brace-style'],
78
78
  // ensures that literals on classes are exposed in a consistent style
79
79
  '@typescript-eslint/class-literal-property-style': 2,
80
+ // enforce that class methods utilize `this`
81
+ '@typescript-eslint/class-methods-use-this':
82
+ bestPractices['class-methods-use-this'],
80
83
  // require or disallow trailing comma
81
84
  '@typescript-eslint/comma-dangle': stylisticIssues['comma-dangle'],
82
85
  // enforces consistent spacing before and after commas
@@ -144,8 +147,6 @@ module.exports = {
144
147
  '@typescript-eslint/no-confusing-non-null-assertion': 2,
145
148
  // disallow duplicate class members
146
149
  '@typescript-eslint/no-dupe-class-members': es6['no-dupe-class-members'],
147
- // disallow duplicate imports
148
- '@typescript-eslint/no-duplicate-imports': es6['no-duplicate-imports'],
149
150
  // disallow the delete operator with computed key expressions
150
151
  '@typescript-eslint/no-dynamic-delete': 2,
151
152
  // disallow empty functions
@@ -162,8 +163,6 @@ module.exports = {
162
163
  '@typescript-eslint/no-extra-semi': possibleErrors['no-extra-semi'],
163
164
  // forbids the use of classes as namespaces
164
165
  '@typescript-eslint/no-extraneous-class': 2,
165
- // disallow usage of the implicit `any` type in catch clauses
166
- '@typescript-eslint/no-implicit-any-catch': 1,
167
166
  // disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean
168
167
  '@typescript-eslint/no-inferrable-types': 2,
169
168
  // disallow `this` keywords outside of classes or class-like objects
@@ -187,8 +186,6 @@ module.exports = {
187
186
  '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 2,
188
187
  // disallows non-null assertions using the `!` postfix operator
189
188
  '@typescript-eslint/no-non-null-assertion': 0,
190
- // disallow the use of parameter properties in class constructors
191
- '@typescript-eslint/no-parameter-properties': 1,
192
189
  // disallow variable redeclaration
193
190
  '@typescript-eslint/no-redeclare': bestPractices['no-redeclare'],
194
191
  // disallows invocation of `require()`
@@ -242,8 +239,6 @@ module.exports = {
242
239
  '@typescript-eslint/quotes': stylisticIssues.quotes,
243
240
  // require or disallow semicolons instead of ASI
244
241
  '@typescript-eslint/semi': stylisticIssues.semi,
245
- // enforces that members of a type union/intersection are sorted alphabetically
246
- '@typescript-eslint/sort-type-union-intersection-members': 0,
247
242
  // enforces consistent spacing before function parenthesis
248
243
  '@typescript-eslint/space-before-function-paren':
249
244
  stylisticIssues['space-before-function-paren'],
@@ -119,8 +119,6 @@ module.exports = {
119
119
  'no-restricted-properties': 0,
120
120
  // disallow use of assignment in `return` statement
121
121
  'no-return-assign': 2,
122
- // disallow unnecessary `return await`
123
- 'no-return-await': 2,
124
122
  // disallow use of `javascript:` urls.
125
123
  'no-script-url': 2,
126
124
  // disallow assignments where both sides are exactly the same
@@ -128,8 +128,8 @@ module.exports = {
128
128
  'no-negated-condition': 2,
129
129
  // disallow nested ternary expressions
130
130
  'no-nested-ternary': 2,
131
- // disallow use of the `Object` constructor
132
- 'no-new-object': 2,
131
+ // disallow calls to the `Object` constructor without an argument
132
+ 'no-object-constructor': 2,
133
133
  // disallow use of unary operators, `++` and `--`
134
134
  'no-plusplus': 0,
135
135
  // disallow use of certain syntax in code