@will-stone/eslint-config 16.1.0 → 17.0.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/index.js +36 -5
  2. package/package.json +25 -20
package/dist/index.js CHANGED
@@ -632,7 +632,34 @@ async function node() {
632
632
  // src/configs/package-json.ts
633
633
  import pluginPackageJson from "eslint-plugin-package-json";
634
634
  async function packageJson() {
635
- return [pluginPackageJson.configs.recommended];
635
+ return [
636
+ {
637
+ ...pluginPackageJson.configs.recommended,
638
+ rules: {
639
+ "package-json/no-empty-fields": "error",
640
+ "package-json/no-redundant-files": "error",
641
+ "package-json/order-properties": "warn",
642
+ "package-json/repository-shorthand": "warn",
643
+ "package-json/require-author": "error",
644
+ "package-json/require-description": "error",
645
+ "package-json/require-engines": "error",
646
+ "package-json/require-files": "error",
647
+ "package-json/require-keywords": "error",
648
+ "package-json/require-name": "error",
649
+ // This rule is a little too strict as it's better to use "exports".
650
+ "package-json/require-types": "off",
651
+ "package-json/require-version": "error",
652
+ "package-json/restrict-dependency-ranges": "error",
653
+ "package-json/sort-collections": "warn",
654
+ "package-json/unique-dependencies": "error",
655
+ "package-json/valid-local-dependency": "error",
656
+ "package-json/valid-name": "error",
657
+ "package-json/valid-package-definition": "error",
658
+ "package-json/valid-repository-directory": "error",
659
+ "package-json/valid-version": "error"
660
+ }
661
+ }
662
+ ];
636
663
  }
637
664
 
638
665
  // src/configs/react.ts
@@ -1063,7 +1090,7 @@ async function typescript(rawOptions) {
1063
1090
  "@typescript-eslint/no-misused-new": "error",
1064
1091
  "@typescript-eslint/no-namespace": "error",
1065
1092
  "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
1066
- "@typescript-eslint/no-non-null-assertion": "warn",
1093
+ "@typescript-eslint/no-non-null-assertion": "off",
1067
1094
  "@typescript-eslint/no-this-alias": "error",
1068
1095
  "@typescript-eslint/no-unsafe-function-type": "warn",
1069
1096
  "@typescript-eslint/no-wrapper-object-types": "error",
@@ -1100,6 +1127,7 @@ async function typescript(rawOptions) {
1100
1127
  "@typescript-eslint/no-unnecessary-template-expression": "error",
1101
1128
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
1102
1129
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
1130
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1103
1131
  "@typescript-eslint/no-unnecessary-type-parameters": "error",
1104
1132
  "@typescript-eslint/no-unsafe-argument": "off",
1105
1133
  "@typescript-eslint/no-unsafe-assignment": "off",
@@ -1263,7 +1291,6 @@ async function unicorn() {
1263
1291
  "unicorn/no-array-callback-reference": "off",
1264
1292
  "unicorn/no-array-for-each": "warn",
1265
1293
  "unicorn/no-array-method-this-argument": "warn",
1266
- "unicorn/no-array-push-push": "warn",
1267
1294
  "unicorn/no-array-reduce": "error",
1268
1295
  "unicorn/no-await-expression-member": "warn",
1269
1296
  "unicorn/no-await-in-promise-methods": "error",
@@ -1286,7 +1313,6 @@ async function unicorn() {
1286
1313
  disallowedPrefixes: ["new"]
1287
1314
  }
1288
1315
  ],
1289
- "unicorn/no-length-as-slice-end": "warn",
1290
1316
  "unicorn/no-lonely-if": "warn",
1291
1317
  "unicorn/no-magic-array-flat-depth": "error",
1292
1318
  "unicorn/no-named-default": "warn",
@@ -1303,8 +1329,11 @@ async function unicorn() {
1303
1329
  "unicorn/no-thenable": "error",
1304
1330
  "unicorn/no-this-assignment": "error",
1305
1331
  "unicorn/no-typeof-undefined": "warn",
1332
+ "unicorn/no-unnecessary-array-flat-depth": "warn",
1333
+ "unicorn/no-unnecessary-array-splice-count": "warn",
1306
1334
  "unicorn/no-unnecessary-await": "warn",
1307
1335
  "unicorn/no-unnecessary-polyfills": "error",
1336
+ "unicorn/no-unnecessary-slice-end": "warn",
1308
1337
  "unicorn/no-unreadable-array-destructuring": "error",
1309
1338
  "unicorn/no-unreadable-iife": "error",
1310
1339
  // Recommended config turned this off so I will too
@@ -1336,6 +1365,7 @@ async function unicorn() {
1336
1365
  "unicorn/prefer-event-target": "error",
1337
1366
  "unicorn/prefer-export-from": "warn",
1338
1367
  "unicorn/prefer-global-this": "warn",
1368
+ "unicorn/prefer-import-meta-properties": "warn",
1339
1369
  "unicorn/prefer-includes": "warn",
1340
1370
  "unicorn/prefer-json-parse-buffer": "warn",
1341
1371
  "unicorn/prefer-keyboard-event-key": "warn",
@@ -1360,6 +1390,7 @@ async function unicorn() {
1360
1390
  "unicorn/prefer-regexp-test": "warn",
1361
1391
  "unicorn/prefer-set-has": "warn",
1362
1392
  "unicorn/prefer-set-size": "warn",
1393
+ "unicorn/prefer-single-call": "warn",
1363
1394
  "unicorn/prefer-spread": "warn",
1364
1395
  "unicorn/prefer-string-raw": "warn",
1365
1396
  "unicorn/prefer-string-replace-all": "warn",
@@ -1526,7 +1557,7 @@ var autoConfigs = [
1526
1557
  ];
1527
1558
 
1528
1559
  // src/utils/check-deps-exist.ts
1529
- import { readFileSync } from "node:fs";
1560
+ import { readFileSync } from "fs";
1530
1561
  import { globbySync } from "globby";
1531
1562
  function checkDepsExist(depNames) {
1532
1563
  const depCount = depNames.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "16.1.0",
3
+ "version": "17.0.0",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"
@@ -14,6 +14,7 @@
14
14
  "author": "Will Stone",
15
15
  "type": "module",
16
16
  "exports": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
17
18
  "files": [
18
19
  "dist"
19
20
  ],
@@ -30,29 +31,29 @@
30
31
  "typecheck": "tsc --noEmit"
31
32
  },
32
33
  "dependencies": {
33
- "@typescript-eslint/eslint-plugin": "^8.30.1",
34
- "@typescript-eslint/parser": "^8.30.1",
34
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
35
+ "@typescript-eslint/parser": "^8.32.1",
35
36
  "confusing-browser-globals": "^1.0.11",
36
37
  "eslint-config-flat-gitignore": "^2.1.0",
37
- "eslint-plugin-import-x": "^4.10.5",
38
+ "eslint-plugin-import-x": "^4.13.1",
38
39
  "eslint-plugin-jsx-a11y": "^6.10.2",
39
- "eslint-plugin-n": "^17.17.0",
40
- "eslint-plugin-package-json": "^0.29.1",
41
- "eslint-plugin-unicorn": "^58.0.0",
42
- "globals": "^16.0.0",
40
+ "eslint-plugin-n": "^17.18.0",
41
+ "eslint-plugin-package-json": "^0.31.0",
42
+ "eslint-plugin-unicorn": "^59.0.1",
43
+ "globals": "^16.2.0",
43
44
  "globby": "^14.1.0",
44
- "type-fest": "^4.40.0"
45
+ "type-fest": "^4.41.0"
45
46
  },
46
47
  "devDependencies": {
47
- "@commits-with-character/conventional-changelog-preset": "^4.0.0",
48
+ "@commits-with-character/conventional-changelog-preset": "^5.1.1",
48
49
  "@eslint/config-inspector": "^1.0.2",
49
50
  "@release-it/conventional-changelog": "^10.0.1",
50
51
  "@types/confusing-browser-globals": "^1.0.3",
51
52
  "@types/eslint": "^9.6.1",
52
- "@types/node": "^22.14.1",
53
- "@typescript-eslint/utils": "^8.30.1",
54
- "@vitest/eslint-plugin": "^1.1.43",
55
- "@will-stone/prettier-config": "^11.0.0",
53
+ "@types/node": "^22.15.21",
54
+ "@typescript-eslint/utils": "^8.32.1",
55
+ "@vitest/eslint-plugin": "^1.2.1",
56
+ "@will-stone/prettier-config": "^11.0.1",
56
57
  "astro-eslint-parser": "^1.2.2",
57
58
  "eslint-plugin-astro": "^1.3.1",
58
59
  "eslint-plugin-jest": "^28.11.0",
@@ -60,13 +61,13 @@
60
61
  "eslint-plugin-react-hooks": "^5.2.0",
61
62
  "eslint-plugin-tailwindcss": "^3.18.0",
62
63
  "husky": "^9.1.7",
63
- "lint-staged": "^15.5.1",
64
- "memfs": "^4.17.0",
64
+ "lint-staged": "^16.0.0",
65
+ "memfs": "^4.17.2",
65
66
  "prettier": "^3.5.3",
66
- "release-it": "^19.0.1",
67
- "tsup": "^8.4.0",
67
+ "release-it": "^19.0.2",
68
+ "tsup": "^8.5.0",
68
69
  "typescript": "^5.8.3",
69
- "vitest": "^3.1.1"
70
+ "vitest": "^3.1.4"
70
71
  },
71
72
  "peerDependencies": {
72
73
  "@vitest/eslint-plugin": "^1.1.43",
@@ -102,9 +103,13 @@
102
103
  }
103
104
  },
104
105
  "packageManager": "pnpm@10.6.5",
106
+ "engines": {
107
+ "node": ">=22"
108
+ },
105
109
  "pnpm": {
106
110
  "onlyBuiltDependencies": [
107
- "esbuild"
111
+ "esbuild",
112
+ "unrs-resolver"
108
113
  ]
109
114
  }
110
115
  }