@josundt/eslint-config 4.7.3 → 4.8.3
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 +8 -8
- package/rules/eslint.js +6 -0
- package/rules/typescript-eslint.js +10 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@josundt/eslint-config",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.8.3",
|
4
4
|
"description": "ESLint ruleset with required plugins for josundt TypeScript projects",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -27,17 +27,17 @@
|
|
27
27
|
"utils/**/*.js"
|
28
28
|
],
|
29
29
|
"peerDependencies": {
|
30
|
-
"typescript": ">=4.
|
30
|
+
"typescript": ">=4.8.2"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"@typescript-eslint/eslint-plugin": "5.
|
34
|
-
"@typescript-eslint/parser": "5.
|
35
|
-
"eslint": "8.
|
36
|
-
"eslint-import-resolver-typescript": "
|
33
|
+
"@typescript-eslint/eslint-plugin": "5.36.1",
|
34
|
+
"@typescript-eslint/parser": "5.36.1",
|
35
|
+
"eslint": "8.23.0",
|
36
|
+
"eslint-import-resolver-typescript": "3.5.0",
|
37
37
|
"eslint-plugin-deprecation": "1.3.2",
|
38
38
|
"eslint-plugin-import": "2.26.0",
|
39
39
|
"eslint-plugin-jasmine": "4.1.3",
|
40
|
-
"eslint-plugin-jsdoc": "39.3.
|
41
|
-
"eslint-plugin-unicorn": "
|
40
|
+
"eslint-plugin-jsdoc": "39.3.6",
|
41
|
+
"eslint-plugin-unicorn": "43.0.2"
|
42
42
|
}
|
43
43
|
}
|
package/rules/eslint.js
CHANGED
@@ -224,6 +224,12 @@ module.exports = {
|
|
224
224
|
"allowAfterThis": true
|
225
225
|
}
|
226
226
|
],
|
227
|
+
"no-unneeded-ternary": [
|
228
|
+
"error",
|
229
|
+
{
|
230
|
+
"defaultAssignment": true
|
231
|
+
}
|
232
|
+
],
|
227
233
|
"no-unsafe-finally": "error",
|
228
234
|
"no-unused-expressions": "error", // Switched off since it breaks support for null coalescing and optional chaining in TypeScript: https://github.com/typescript-eslint/typescript-eslint/issues/1051 - https://github.com/typescript-eslint/typescript-eslint/issues/1052
|
229
235
|
"no-unused-labels": "error",
|
@@ -164,6 +164,7 @@ module.exports = {
|
|
164
164
|
],
|
165
165
|
"@typescript-eslint/ban-tslint-comment": "error", // No longer use tslint - remove rules
|
166
166
|
"@typescript-eslint/ban-types": "off", // Can be used to ban certain types
|
167
|
+
"@typescript-eslint/consistent-generic-constructors": ["off", "constructor"],
|
167
168
|
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
|
168
169
|
"@typescript-eslint/consistent-type-assertions": [
|
169
170
|
"error",
|
@@ -349,15 +350,21 @@ module.exports = {
|
|
349
350
|
"allow": ["private readonly", "private", "protected readonly"]
|
350
351
|
}
|
351
352
|
],
|
352
|
-
"@typescript-eslint/prefer-as-const": "
|
353
|
+
"@typescript-eslint/prefer-as-const": "off",
|
353
354
|
"@typescript-eslint/prefer-enum-initializers": "error",
|
354
355
|
"@typescript-eslint/prefer-for-of": "error",
|
355
356
|
"@typescript-eslint/prefer-function-type": "error",
|
356
357
|
"@typescript-eslint/prefer-includes": "error",
|
357
358
|
"@typescript-eslint/prefer-literal-enum-member": "error",
|
358
359
|
"@typescript-eslint/prefer-namespace-keyword": "error",
|
359
|
-
"@typescript-eslint/prefer-nullish-coalescing":
|
360
|
-
|
360
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
361
|
+
"error",
|
362
|
+
{
|
363
|
+
"ignoreConditionalTests": true,
|
364
|
+
"ignoreTernaryTests": true,
|
365
|
+
"ignoreMixedLogicalExpressions": true
|
366
|
+
}
|
367
|
+
], "@typescript-eslint/prefer-optional-chain": "error",
|
361
368
|
"@typescript-eslint/prefer-readonly": "error",
|
362
369
|
"@typescript-eslint/prefer-readonly-parameter-types": "off", // Could be useful but requires too much work and verbose notation
|
363
370
|
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|