@will-stone/eslint-config 26.0.1 → 26.0.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/dist/index.js +23 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11,15 +11,15 @@ import _ from "@stylistic/eslint-plugin";
|
|
|
11
11
|
import w from "@typescript-eslint/eslint-plugin";
|
|
12
12
|
import C from "eslint-plugin-unicorn";
|
|
13
13
|
import { globbySync as N } from "globby";
|
|
14
|
-
import { readFileSync as
|
|
15
|
-
import
|
|
16
|
-
const i = "?([cm])[jt]s?(x)", d = `**/*.${i}`, j = "**/*.?([cm])ts", x = "**/*.?([cm])tsx",
|
|
14
|
+
import { readFileSync as E } from "node:fs";
|
|
15
|
+
import L from "debug";
|
|
16
|
+
const i = "?([cm])[jt]s?(x)", d = `**/*.${i}`, j = "**/*.?([cm])ts", x = "**/*.?([cm])tsx", A = [
|
|
17
17
|
`**/__tests__/**/*.${i}`,
|
|
18
18
|
`**/*.spec.${i}`,
|
|
19
19
|
`**/*.test.${i}`,
|
|
20
20
|
`**/*.bench.${i}`,
|
|
21
21
|
`**/*.benchmark.${i}`
|
|
22
|
-
],
|
|
22
|
+
], S = "**/*.astro", T = "**/*.astro/*.ts", B = "**/*.{jsx,tsx,astro}", I = [
|
|
23
23
|
"**/node_modules",
|
|
24
24
|
"**/dist",
|
|
25
25
|
"**/package-lock.json",
|
|
@@ -56,7 +56,7 @@ async function G(r) {
|
|
|
56
56
|
]);
|
|
57
57
|
return [
|
|
58
58
|
{
|
|
59
|
-
files: [
|
|
59
|
+
files: [S],
|
|
60
60
|
languageOptions: {
|
|
61
61
|
globals: e.environments.astro.globals,
|
|
62
62
|
parser: o,
|
|
@@ -1118,7 +1118,7 @@ for (const r of w.configs["flat/all"])
|
|
|
1118
1118
|
function X() {
|
|
1119
1119
|
return [
|
|
1120
1120
|
{
|
|
1121
|
-
files: [
|
|
1121
|
+
files: [T, j, x],
|
|
1122
1122
|
languageOptions: {
|
|
1123
1123
|
parser: g,
|
|
1124
1124
|
parserOptions: {
|
|
@@ -1260,7 +1260,20 @@ function X() {
|
|
|
1260
1260
|
"@typescript-eslint/no-useless-default-assignment": "warn",
|
|
1261
1261
|
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
|
|
1262
1262
|
"@typescript-eslint/only-throw-error": "error",
|
|
1263
|
-
"@typescript-eslint/prefer-destructuring": [
|
|
1263
|
+
"@typescript-eslint/prefer-destructuring": [
|
|
1264
|
+
"warn",
|
|
1265
|
+
{
|
|
1266
|
+
AssignmentExpression: {
|
|
1267
|
+
array: !1,
|
|
1268
|
+
object: !1
|
|
1269
|
+
},
|
|
1270
|
+
VariableDeclarator: {
|
|
1271
|
+
// Make compatible with Unicorn's no-unreadable-array-destructuring.
|
|
1272
|
+
array: !1,
|
|
1273
|
+
object: !0
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
],
|
|
1264
1277
|
"@typescript-eslint/prefer-find": "error",
|
|
1265
1278
|
"@typescript-eslint/prefer-includes": "warn",
|
|
1266
1279
|
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
@@ -1468,7 +1481,7 @@ async function W(r) {
|
|
|
1468
1481
|
const e = await s(import("@vitest/eslint-plugin"));
|
|
1469
1482
|
return [
|
|
1470
1483
|
{
|
|
1471
|
-
files:
|
|
1484
|
+
files: A,
|
|
1472
1485
|
name: "will-stone/vitest",
|
|
1473
1486
|
plugins: { vitest: e },
|
|
1474
1487
|
rules: {
|
|
@@ -1607,7 +1620,7 @@ function Y(r) {
|
|
|
1607
1620
|
for (const a of r)
|
|
1608
1621
|
o[a] = !1;
|
|
1609
1622
|
for (const a of e) {
|
|
1610
|
-
const p =
|
|
1623
|
+
const p = E(a), l = new TextDecoder().decode(p), f = JSON.parse(l);
|
|
1611
1624
|
for (const n of r)
|
|
1612
1625
|
if ((typeof f.dependencies?.[n] == "string" || typeof f.devDependencies?.[n] == "string") && (o[n] = !0, t()))
|
|
1613
1626
|
break;
|
|
@@ -1616,7 +1629,7 @@ function Y(r) {
|
|
|
1616
1629
|
}
|
|
1617
1630
|
return o;
|
|
1618
1631
|
}
|
|
1619
|
-
const Z =
|
|
1632
|
+
const Z = L("eslint:ws"), ee = {};
|
|
1620
1633
|
async function re(r = ee) {
|
|
1621
1634
|
const e = [], o = Object.values(m).map(({ dep: n }) => n), t = Y(o), a = m.filter(({ dep: n, optionName: u }) => (
|
|
1622
1635
|
// Is forced on.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.3",
|
|
4
4
|
"description": "Will Stone's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"eslint": ">=9.34.0",
|
|
85
85
|
"eslint-plugin-astro": "^1.3.1",
|
|
86
86
|
"eslint-plugin-react": "^7.37.4",
|
|
87
|
-
"eslint-plugin-react-hooks": "^
|
|
87
|
+
"eslint-plugin-react-hooks": "^7.2.1",
|
|
88
88
|
"eslint-plugin-tailwindcss": "^3.18.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|