@will-stone/eslint-config 26.0.2 → 26.1.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 +25 -11
  2. package/package.json +1 -1
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 L } from "node:fs";
15
- import E from "debug";
16
- const i = "?([cm])[jt]s?(x)", d = `**/*.${i}`, j = "**/*.?([cm])ts", x = "**/*.?([cm])tsx", S = [
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
- ], T = "**/*.astro", A = "**/*.astro/*.ts", B = "**/*.{jsx,tsx,astro}", I = [
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: [T],
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: [A, j, x],
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": ["warn", { array: !1, object: !0 }],
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",
@@ -1280,7 +1293,8 @@ function X() {
1280
1293
  "@typescript-eslint/restrict-plus-operands": "error",
1281
1294
  "@typescript-eslint/restrict-template-expressions": "error",
1282
1295
  "@typescript-eslint/return-await": "warn",
1283
- "@typescript-eslint/strict-boolean-expressions": "error",
1296
+ // Way too noisy, not particularly helpful most of the time.
1297
+ "@typescript-eslint/strict-boolean-expressions": "off",
1284
1298
  "@typescript-eslint/strict-void-return": "error",
1285
1299
  "@typescript-eslint/switch-exhaustiveness-check": "error",
1286
1300
  "@typescript-eslint/unbound-method": "error",
@@ -1468,7 +1482,7 @@ async function W(r) {
1468
1482
  const e = await s(import("@vitest/eslint-plugin"));
1469
1483
  return [
1470
1484
  {
1471
- files: S,
1485
+ files: A,
1472
1486
  name: "will-stone/vitest",
1473
1487
  plugins: { vitest: e },
1474
1488
  rules: {
@@ -1607,7 +1621,7 @@ function Y(r) {
1607
1621
  for (const a of r)
1608
1622
  o[a] = !1;
1609
1623
  for (const a of e) {
1610
- const p = L(a), l = new TextDecoder().decode(p), f = JSON.parse(l);
1624
+ const p = E(a), l = new TextDecoder().decode(p), f = JSON.parse(l);
1611
1625
  for (const n of r)
1612
1626
  if ((typeof f.dependencies?.[n] == "string" || typeof f.devDependencies?.[n] == "string") && (o[n] = !0, t()))
1613
1627
  break;
@@ -1616,7 +1630,7 @@ function Y(r) {
1616
1630
  }
1617
1631
  return o;
1618
1632
  }
1619
- const Z = E("eslint:ws"), ee = {};
1633
+ const Z = L("eslint:ws"), ee = {};
1620
1634
  async function re(r = ee) {
1621
1635
  const e = [], o = Object.values(m).map(({ dep: n }) => n), t = Y(o), a = m.filter(({ dep: n, optionName: u }) => (
1622
1636
  // Is forced on.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "26.0.2",
3
+ "version": "26.1.0",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"