@josundt/eslint-config 5.6.3 → 5.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josundt/eslint-config",
3
- "version": "5.6.3",
3
+ "version": "5.7.3",
4
4
  "description": "ESLint ruleset with required plugins for josundt TypeScript projects",
5
5
  "type": "module",
6
6
  "exports": {
@@ -38,23 +38,23 @@
38
38
  "utils/**/*.js"
39
39
  ],
40
40
  "peerDependencies": {
41
- "typescript": ">=5.6.3"
41
+ "typescript": ">=5.7.2"
42
42
  },
43
43
  "dependencies": {
44
- "@josundt/prettier-config": "^3.3.3",
45
- "@eslint/js": "9.14.0",
46
- "@typescript-eslint/eslint-plugin": "8.13.0",
47
- "@typescript-eslint/parser": "8.13.0",
48
- "eslint": "9.14.0",
44
+ "@josundt/prettier-config": "^3.4.2",
45
+ "@eslint/js": "9.16.0",
46
+ "@typescript-eslint/eslint-plugin": "8.17.0",
47
+ "@typescript-eslint/parser": "8.17.0",
48
+ "eslint": "9.16.0",
49
49
  "eslint-formatter-visualstudio": "8.40.0",
50
- "eslint-import-resolver-typescript": "3.6.3",
50
+ "eslint-import-resolver-typescript": "3.7.0",
51
51
  "eslint-plugin-eslint-comments": "3.2.0",
52
52
  "eslint-plugin-import": "2.31.0",
53
53
  "eslint-plugin-jasmine": "4.2.2",
54
54
  "eslint-plugin-jest": "28.9.0",
55
- "eslint-plugin-jsdoc": "50.4.3",
55
+ "eslint-plugin-jsdoc": "50.6.0",
56
56
  "eslint-plugin-prettier": "5.2.1",
57
- "eslint-plugin-unicorn": "56.0.0"
57
+ "eslint-plugin-unicorn": "56.0.1"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/eslint__js": "8.42.3"
@@ -40,6 +40,7 @@ const extensions = new Map([
40
40
  exceptAfterOverload: true
41
41
  }
42
42
  ],
43
+ ["max-params", true],
43
44
  ["no-array-constructor", true],
44
45
  ["no-dupe-class-members", true],
45
46
  ["no-duplicate-imports", false], // typescript-eslint 5.25.0: deprecated in favour of import/no-duplicates
@@ -80,14 +81,17 @@ const extensions = new Map([
80
81
  "prefer-destructuring",
81
82
  [{}, { enforceForDeclarationWithTypeAnnotation: false }]
82
83
  ],
83
- ["prefer-promise-reject-errors", true],
84
+ ["prefer-promise-reject-errors", {
85
+ allowThrowingAny: false,
86
+ allowThrowingUnknown: false
87
+ }],
84
88
  ["require-await", true],
85
89
  ["return-await", true]
86
90
  ]);
87
91
 
88
- // console.log(extensionRules);
89
- // console.log(`Converted ${Object.keys(extensionRules).filter(k => !k.startsWith("@typescript")).length} of ${extensions.size} available extension rules`);
90
- // console.log("Not converted:", Array.from(extensions.keys()).filter(k => !Object.keys(extensionRules).filter(k => !k.startsWith("@typescript")).includes(k)));
92
+ // console.log(extensionRules)
93
+ // console.log(`Converted ${Object.keys(extensionRules).filter(k => !k.startsWith("@typescript")).length} of ${extensions.size} available extension rules`)
94
+ // console.log("Not converted:", Array.from(extensions.keys()).filter(k => !Object.keys(extensionRules).filter(k => !k.startsWith("@typescript")).includes(k)))
91
95
 
92
96
  // Building eslint-typescript rules for existsing eslint rules and switching off original eslint rule
93
97
  export const typescriptEslintExtensionrules = Object.entries(
@@ -124,7 +124,9 @@ const rules = {
124
124
  "no-confusing-void-expression": [
125
125
  "error",
126
126
  {
127
- ignoreArrowShorthand: true
127
+ ignoreArrowShorthand: true,
128
+ ignoreVoidOperator: false,
129
+ ignoreVoidReturningFunctions: false
128
130
  }
129
131
  ],
130
132
  "no-deprecated": "error",
@@ -139,7 +141,13 @@ const rules = {
139
141
  }
140
142
  ],
141
143
  "no-extra-non-null-assertion": "error",
142
- "no-extraneous-class": "error",
144
+ "no-extraneous-class": ["error", {
145
+
146
+ allowConstructorOnly: false, // Whether to allow extraneous classes that contain only a constructor.
147
+ allowEmpty: false, // Whether to allow extraeous classes that have no body (i.e. are empty).
148
+ allowStaticOnly: true, // Whether to allow extraneous classes that only contain static members.
149
+ allowWithDecorator: false // Whether to allow extraneous classes that include a decorator.
150
+ }],
143
151
  "no-floating-promises": "error", // Must be switched on to prevent promises not awaited
144
152
  "no-for-in-array": "error",
145
153
  "no-import-type-side-effects": "error",
@@ -207,6 +215,7 @@ const rules = {
207
215
  "no-unsafe-call": "error",
208
216
  "no-unsafe-member-access": "error",
209
217
  "no-unsafe-return": "error",
218
+ "no-unsafe-type-assertion": "off", // This rule will be difficult to enable because we sometimes need to force a type assertion
210
219
  "no-useless-empty-export": "error",
211
220
  "no-unnecessary-template-expression": "error",
212
221
  "no-var-requires": "error",
@@ -263,6 +272,7 @@ const rules = {
263
272
  }
264
273
  ],
265
274
  "promise-function-async": "off",
275
+ "related-getter-setter-pairs": "error",
266
276
  "require-array-sort-compare": [
267
277
  "error",
268
278
  {