@jpp-toolkit/eslint-config 0.0.18 → 0.0.20

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": "@jpp-toolkit/eslint-config",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "ESLint configurations for JS/TS projects.",
5
5
  "keywords": [
6
6
  "jpp",
@@ -34,6 +34,7 @@
34
34
  "@eslint/compat": "2.0.0",
35
35
  "@eslint/js": "9.39.2",
36
36
  "@stylistic/eslint-plugin": "5.6.1",
37
+ "@types/eslint-plugin-jsx-a11y": "6.10.1",
37
38
  "@vitest/eslint-plugin": "1.5.2",
38
39
  "eslint-config-prettier": "10.1.8",
39
40
  "eslint-import-resolver-typescript": "4.4.4",
@@ -49,7 +50,6 @@
49
50
  "@jpp-toolkit/utils": "0.0.14"
50
51
  },
51
52
  "devDependencies": {
52
- "@types/eslint-plugin-jsx-a11y": "6.10.1",
53
53
  "eslint": "9.39.2"
54
54
  },
55
55
  "peerDependencies": {
@@ -141,7 +141,7 @@ export const eslintConfig = defineConfig({
141
141
  * Require return statements to either always or never specify values.
142
142
  * @see {@link https://eslint.org/docs/latest/rules/consistent-return}
143
143
  */
144
- 'consistent-return': 'error',
144
+ 'consistent-return': 'off',
145
145
 
146
146
  /**
147
147
  * Enforce consistent naming when capturing the current execution context.
@@ -721,7 +721,7 @@ export const eslintConfig = defineConfig({
721
721
  * @fixable
722
722
  * @see {@link https://eslint.org/docs/latest/rules/prefer-const}
723
723
  */
724
- 'prefer-const': 'error',
724
+ 'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
725
725
 
726
726
  /**
727
727
  * Require destructuring from arrays and/or objects.
@@ -17,14 +17,14 @@ export const typescriptConfig = defineConfig([
17
17
  },
18
18
  rules: {
19
19
  /**
20
- * Enforce that class methods utilize.
20
+ * Enforce that class methods utilize this.
21
21
  * @extension
22
22
  * @see {@link https://typescript-eslint.io/rules/class-methods-use-this}
23
23
  */
24
24
  // '@typescript-eslint/class-methods-use-this': 'error',
25
25
 
26
26
  /**
27
- * Require.
27
+ * Require return statements to either always or never specify values.
28
28
  * @typeChecked
29
29
  * @extension
30
30
  * @see {@link https://typescript-eslint.io/rules/consistent-return}
@@ -415,7 +415,7 @@ export const typescriptConfig = defineConfig([
415
415
  '@typescript-eslint/prefer-enum-initializers': 'error',
416
416
 
417
417
  /**
418
- * Require private members to be marked as.
418
+ * Require private members to be marked as readonly if they're never modified outside of the constructor.
419
419
  * @fixable
420
420
  * @typeChecked
421
421
  * @see {@link https://typescript-eslint.io/rules/prefer-readonly}
@@ -423,7 +423,7 @@ export const typescriptConfig = defineConfig([
423
423
  '@typescript-eslint/prefer-readonly': 'error',
424
424
 
425
425
  /**
426
- * Require function parameters to be typed as.
426
+ * Require function parameters to be typed as readonly to prevent accidental mutation of inputs.
427
427
  * @typeChecked
428
428
  * @see {@link https://typescript-eslint.io/rules/prefer-readonly-parameter-types}
429
429
  */
@@ -446,7 +446,7 @@ export const typescriptConfig = defineConfig([
446
446
  '@typescript-eslint/promise-function-async': 'error',
447
447
 
448
448
  /**
449
- * Require.
449
+ * Require Array#sort and Array#toSorted calls to always provide a compareFunction.
450
450
  * @typeChecked
451
451
  * @see {@link https://typescript-eslint.io/rules/require-array-sort-compare}
452
452
  */
@@ -716,20 +716,20 @@ export const typescriptConfig = defineConfig([
716
716
  // '@typescript-eslint/no-inferrable-types': 'off',
717
717
 
718
718
  /**
719
- * Disallow.
719
+ * Disallow void type outside of generic or return types.
720
720
  * @config strict
721
721
  * @see {@link https://typescript-eslint.io/rules/no-invalid-void-type}
722
722
  */
723
723
  // '@typescript-eslint/no-invalid-void-type': 'off',
724
724
 
725
725
  /**
726
- * Disallow the.
726
+ * Disallow the void operator except when used to discard a value.
727
727
  * @config strict
728
728
  * @fixable
729
729
  * @typeChecked
730
730
  * @see {@link https://typescript-eslint.io/rules/no-meaningless-void-operator}
731
731
  */
732
- // '@typescript-eslint/no-meaningless-void-operator': 'off',
732
+ '@typescript-eslint/no-meaningless-void-operator': 'off',
733
733
 
734
734
  /**
735
735
  * Enforce valid definition of.
@@ -1101,7 +1101,7 @@ export const typescriptConfig = defineConfig([
1101
1101
  // '@typescript-eslint/prefer-reduce-type-parameter': 'off',
1102
1102
 
1103
1103
  /**
1104
- * Enforce.
1104
+ * Enforce RegExp#exec over String#match if no global flag is provided.
1105
1105
  * @config stylistic
1106
1106
  * @fixable
1107
1107
  * @typeChecked
@@ -1110,7 +1110,7 @@ export const typescriptConfig = defineConfig([
1110
1110
  // '@typescript-eslint/prefer-regexp-exec': 'off',
1111
1111
 
1112
1112
  /**
1113
- * Enforce that.
1113
+ * Enforce that this is used when only this type is returned.
1114
1114
  * @config strict
1115
1115
  * @fixable
1116
1116
  * @typeChecked
@@ -1119,7 +1119,7 @@ export const typescriptConfig = defineConfig([
1119
1119
  // '@typescript-eslint/prefer-return-this-type': 'off',
1120
1120
 
1121
1121
  /**
1122
- * Enforce using.
1122
+ * Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.
1123
1123
  * @config stylistic
1124
1124
  * @fixable
1125
1125
  * @typeChecked
@@ -1128,7 +1128,7 @@ export const typescriptConfig = defineConfig([
1128
1128
  // '@typescript-eslint/prefer-string-starts-ends-with': 'off',
1129
1129
 
1130
1130
  /**
1131
- * Enforce that.
1131
+ * Enforce that get() types should be assignable to their equivalent set() type.
1132
1132
  * @config strict
1133
1133
  * @typeChecked
1134
1134
  * @see {@link https://typescript-eslint.io/rules/related-getter-setter-pairs}
@@ -1136,7 +1136,7 @@ export const typescriptConfig = defineConfig([
1136
1136
  // '@typescript-eslint/related-getter-setter-pairs': 'off',
1137
1137
 
1138
1138
  /**
1139
- * Disallow async functions which do not return promises and have no.
1139
+ * Disallow async functions which do not return promises and have no await expression.
1140
1140
  * @config recommended
1141
1141
  * @typeChecked
1142
1142
  * @extension
@@ -1145,7 +1145,7 @@ export const typescriptConfig = defineConfig([
1145
1145
  // '@typescript-eslint/require-await': 'off',
1146
1146
 
1147
1147
  /**
1148
- * Require both operands of addition to be the same type and be.
1148
+ * Require both operands of addition to be the same type and be bigint, number, or string.
1149
1149
  * @config recommended
1150
1150
  * @typeChecked
1151
1151
  * @see {@link https://typescript-eslint.io/rules/restrict-plus-operands}
@@ -1153,7 +1153,7 @@ export const typescriptConfig = defineConfig([
1153
1153
  // '@typescript-eslint/restrict-plus-operands': 'off',
1154
1154
 
1155
1155
  /**
1156
- * Enforce template literal expressions to be of.
1156
+ * Enforce template literal expressions to be of string type.
1157
1157
  * @config recommended
1158
1158
  * @typeChecked
1159
1159
  * @see {@link https://typescript-eslint.io/rules/restrict-template-expressions}
@@ -1192,7 +1192,7 @@ export const typescriptConfig = defineConfig([
1192
1192
  // '@typescript-eslint/unified-signatures': 'off',
1193
1193
 
1194
1194
  /**
1195
- * Enforce typing arguments in Promise rejection callbacks as.
1195
+ * Enforce typing arguments in Promise rejection callbacks as unknown.
1196
1196
  * @config strict
1197
1197
  * @typeChecked
1198
1198
  * @see {@link https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable}