@wondermarin/eslint-config 2.0.0 → 2.2.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.
Files changed (2) hide show
  1. package/dist/main.js +24 -10
  2. package/package.json +18 -19
package/dist/main.js CHANGED
@@ -372,7 +372,7 @@ function javascriptConfig() {
372
372
  radix: ["error", "always"],
373
373
  "require-atomic-updates": ["error", { allowProperties: false }],
374
374
  "require-await": "error",
375
- "require-unicode-regexp": ["error", { requireFlag: "v" }],
375
+ "require-unicode-regexp": ["error", { requireFlag: "u" }],
376
376
  "require-yield": "error",
377
377
  "sort-imports": "off",
378
378
  "sort-keys": "off",
@@ -591,7 +591,8 @@ async function typescriptConfig() {
591
591
  "error",
592
592
  {
593
593
  ignoreArrowShorthand: false,
594
- ignoreVoidOperator: false
594
+ ignoreVoidOperator: false,
595
+ ignoreVoidReturningFunctions: false
595
596
  }
596
597
  ],
597
598
  "@typescript-eslint/no-dupe-class-members": "off",
@@ -774,13 +775,9 @@ async function typescriptConfig() {
774
775
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
775
776
  ignoreConditionalTests: true,
776
777
  ignoreMixedLogicalExpressions: true,
777
- ignorePrimitives: {
778
- bigint: false,
779
- boolean: false,
780
- number: false,
781
- string: false
782
- },
783
- ignoreTernaryTests: false
778
+ ignorePrimitives: true,
779
+ ignoreTernaryTests: false,
780
+ ignoreBooleanCoercion: false
784
781
  }
785
782
  ],
786
783
  "@typescript-eslint/prefer-optional-chain": [
@@ -843,7 +840,8 @@ async function typescriptConfig() {
843
840
  "error",
844
841
  {
845
842
  allowDefaultCaseForExhaustiveSwitch: true,
846
- requireDefaultForNonUnion: false
843
+ requireDefaultForNonUnion: false,
844
+ considerDefaultExhaustiveForUnions: false
847
845
  }
848
846
  ],
849
847
  "@typescript-eslint/triple-slash-reference": [
@@ -1091,6 +1089,7 @@ async function stylisticConfig() {
1091
1089
  type: "line-length",
1092
1090
  order: "desc",
1093
1091
  ignoreCase: true,
1092
+ specialCharacters: "keep",
1094
1093
  partitionByComment: false,
1095
1094
  partitionByNewLine: true,
1096
1095
  groupKind: "values-first",
@@ -1103,6 +1102,7 @@ async function stylisticConfig() {
1103
1102
  type: "line-length",
1104
1103
  order: "desc",
1105
1104
  ignoreCase: true,
1105
+ specialCharacters: "keep",
1106
1106
  internalPattern: ["@/**"],
1107
1107
  sortSideEffects: false,
1108
1108
  newlinesBetween: "always",
@@ -1138,6 +1138,7 @@ async function stylisticConfig() {
1138
1138
  type: "line-length",
1139
1139
  order: "desc",
1140
1140
  ignoreCase: true,
1141
+ specialCharacters: "keep",
1141
1142
  groupKind: "values-first",
1142
1143
  partitionByComment: false,
1143
1144
  partitionByNewLine: true,
@@ -1150,6 +1151,7 @@ async function stylisticConfig() {
1150
1151
  type: "line-length",
1151
1152
  order: "desc",
1152
1153
  ignoreCase: true,
1154
+ specialCharacters: "keep",
1153
1155
  ignoreAlias: false,
1154
1156
  groupKind: "values-first",
1155
1157
  partitionByComment: false,
@@ -1252,6 +1254,18 @@ function fixupRule(ruleDefinition) {
1252
1254
  ...isLegacyRule ? void 0 : ruleDefinition,
1253
1255
  create: ruleCreate
1254
1256
  };
1257
+ const { schema } = ruleDefinition;
1258
+ if (schema) {
1259
+ if (!newRuleDefinition.meta) {
1260
+ newRuleDefinition.meta = { schema };
1261
+ } else {
1262
+ newRuleDefinition.meta = {
1263
+ ...newRuleDefinition.meta,
1264
+ // top-level `schema` had precedence over `meta.schema` so it's okay to overwrite `meta.schema` if it exists
1265
+ schema
1266
+ };
1267
+ }
1268
+ }
1255
1269
  fixedUpRuleReplacements.set(ruleDefinition, newRuleDefinition);
1256
1270
  fixedUpRules.add(newRuleDefinition);
1257
1271
  return newRuleDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wondermarin/eslint-config",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "Personal ESLint config.",
5
5
  "homepage": "https://github.com/Wondermarin/eslint-config#readme",
6
6
  "repository": {
@@ -28,38 +28,37 @@
28
28
  "build": "tsup"
29
29
  },
30
30
  "dependencies": {
31
- "@stylistic/eslint-plugin": "^2.9.0",
31
+ "@stylistic/eslint-plugin": "^2.10.1",
32
32
  "eslint-config-prettier": "^9.1.0",
33
- "eslint-plugin-package-json": "^0.15.3",
34
- "eslint-plugin-perfectionist": "^3.8.0",
33
+ "eslint-plugin-package-json": "^0.15.6",
34
+ "eslint-plugin-perfectionist": "^3.9.1",
35
35
  "eslint-plugin-prettier": "^5.2.1",
36
- "globals": "^15.11.0",
36
+ "globals": "^15.12.0",
37
37
  "jsonc-eslint-parser": "^2.4.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@eslint/compat": "^1.2.0",
40
+ "@eslint/compat": "^1.2.3",
41
41
  "@types/eslint": "^9.6.1",
42
42
  "@types/eslint-config-prettier": "^6.11.3",
43
- "@types/node": "^22.7.5",
44
- "@typescript-eslint/eslint-plugin": "^8.8.1",
45
- "@typescript-eslint/parser": "^8.8.1",
43
+ "@types/node": "^22.9.0",
44
+ "@typescript-eslint/eslint-plugin": "^8.14.0",
45
+ "@typescript-eslint/parser": "^8.14.0",
46
46
  "@wondermarin/prettier-config": "^1.0.0",
47
47
  "defu": "^6.1.4",
48
- "eslint": "^9.12.0",
49
- "eslint-plugin-react": "^7.37.1",
50
- "eslint-plugin-react-hooks": "^4.6.2",
51
- "jiti": "^2.3.3",
48
+ "eslint": "^9.14.0",
49
+ "eslint-plugin-react": "^7.37.2",
50
+ "eslint-plugin-react-hooks": "^5.0.0",
51
+ "jiti": "^2.4.0",
52
52
  "prettier": "^3.3.3",
53
- "tsup": "^8.3.0",
54
- "tsx": "^4.16.5",
53
+ "tsup": "^8.3.5",
55
54
  "typescript": "^5.6.3"
56
55
  },
57
56
  "peerDependencies": {
58
- "@typescript-eslint/eslint-plugin": "^8.8",
59
- "@typescript-eslint/parser": "^8.8",
60
- "eslint": "^9.12",
57
+ "@typescript-eslint/eslint-plugin": "^8.14",
58
+ "@typescript-eslint/parser": "^8.14",
59
+ "eslint": "^9.14",
61
60
  "eslint-plugin-react": "^7.37",
62
- "eslint-plugin-react-hooks": "^4.6"
61
+ "eslint-plugin-react-hooks": "^5"
63
62
  },
64
63
  "peerDependenciesMeta": {
65
64
  "@typescript-eslint/eslint-plugin": {