@josundt/eslint-config 5.3.1 → 5.4.1

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": "@josundt/eslint-config",
3
- "version": "5.3.1",
3
+ "version": "5.4.1",
4
4
  "description": "ESLint ruleset with required plugins for josundt TypeScript projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,22 +27,22 @@
27
27
  "utils/**/*.js"
28
28
  ],
29
29
  "peerDependencies": {
30
- "typescript": ">=5.3.2"
30
+ "typescript": ">=5.4.2"
31
31
  },
32
32
  "dependencies": {
33
- "@josundt/prettier-config": "^3.1.0",
34
- "@typescript-eslint/eslint-plugin": "6.13.1",
35
- "@typescript-eslint/parser": "6.13.1",
36
- "eslint": "8.54.0",
33
+ "@josundt/prettier-config": "^3.2.5",
34
+ "@typescript-eslint/eslint-plugin": "7.2.0",
35
+ "@typescript-eslint/parser": "7.2.0",
36
+ "eslint": "8.57.0",
37
37
  "eslint-import-resolver-typescript": "3.6.1",
38
38
  "eslint-plugin-deprecation": "2.0.0",
39
39
  "eslint-plugin-eslint-comments": "3.2.0",
40
- "eslint-plugin-import": "2.29.0",
40
+ "eslint-plugin-import": "2.29.1",
41
41
  "eslint-plugin-jasmine": "4.1.3",
42
- "eslint-plugin-jest": "27.6.0",
43
- "eslint-plugin-jsdoc": "46.9.0",
42
+ "eslint-plugin-jest": "27.9.0",
43
+ "eslint-plugin-jsdoc": "48.2.1",
44
44
  "eslint-plugin-no-lookahead-lookbehind-regexp": "0.3.0",
45
- "eslint-plugin-prettier": "5.0.1",
46
- "eslint-plugin-unicorn": "49.0.0"
45
+ "eslint-plugin-prettier": "5.1.3",
46
+ "eslint-plugin-unicorn": "51.0.1"
47
47
  }
48
48
  }
@@ -23,6 +23,7 @@ const extensions = new Map([
23
23
  // ignoreClassesThatImplementAnInterface: false
24
24
  // }
25
25
  ],
26
+ ["consistent-return", true],
26
27
  ["default-param-last", true],
27
28
  [
28
29
  "dot-notation",
@@ -80,6 +81,7 @@ const extensions = new Map([
80
81
  "prefer-destructuring",
81
82
  [{}, { enforceForDeclarationWithTypeAnnotation: false }]
82
83
  ],
84
+ ["prefer-promise-reject-errors", true],
83
85
  ["require-await", true],
84
86
  ["return-await", true]
85
87
  ]);
@@ -128,11 +128,16 @@ const rules = {
128
128
  leadingUnderscore: "allow",
129
129
  trailingUnderscore: "forbid"
130
130
  },
131
+ {
132
+ selector: "import",
133
+ format: ["camelCase", "PascalCase"]
134
+ },
131
135
  {
132
136
  selector: "enumMember",
133
137
  format: ["camelCase", "PascalCase"]
134
138
  }
135
139
  ],
140
+ "no-array-delete": "error",
136
141
  "no-base-to-string": "error",
137
142
  "no-confusing-non-null-assertion": "error",
138
143
  "no-confusing-void-expression": [
@@ -210,6 +215,7 @@ const rules = {
210
215
  "no-unsafe-return": "error",
211
216
  "no-unused-vars-experimental": "off", // to strict with method params...
212
217
  "no-useless-empty-export": "error",
218
+ "no-useless-template-literals": "error",
213
219
  "no-var-requires": "error",
214
220
  "non-nullable-type-assertion-style": "error",
215
221
  "parameter-properties": [
@@ -221,6 +227,7 @@ const rules = {
221
227
  ],
222
228
  "prefer-as-const": "off",
223
229
  "prefer-enum-initializers": "error",
230
+ "prefer-find": "error",
224
231
  "prefer-for-of": "error",
225
232
  "prefer-function-type": "error",
226
233
  "prefer-includes": "error",
@@ -246,7 +253,12 @@ const rules = {
246
253
  "prefer-reduce-type-parameter": "error",
247
254
  "prefer-regexp-exec": "error",
248
255
  "prefer-return-this-type": "error",
249
- "prefer-string-starts-ends-with": "error",
256
+ "prefer-string-starts-ends-with": [
257
+ "error",
258
+ {
259
+ allowSingleElementEquality: "never"
260
+ }
261
+ ],
250
262
  "prefer-ts-expect-error": "error",
251
263
  "promise-function-async": "off",
252
264
  "require-array-sort-compare": [
@@ -286,7 +298,13 @@ const rules = {
286
298
  allowAny: false
287
299
  }
288
300
  ],
289
- "switch-exhaustiveness-check": "error",
301
+ "switch-exhaustiveness-check": [
302
+ "error",
303
+ {
304
+ allowDefaultCaseForExhaustiveSwitch: true,
305
+ requireDefaultForNonUnion: false
306
+ }
307
+ ],
290
308
  "triple-slash-reference": "error",
291
309
  "type-annotation-spacing": "error", // This is a formatting rule
292
310
  "typedef": [