@will-stone/eslint-config 26.0.2 → 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.
Files changed (2) hide show
  1. package/dist/index.js +23 -10
  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",
@@ -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: S,
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 = L(a), l = new TextDecoder().decode(p), f = JSON.parse(l);
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 = E("eslint:ws"), ee = {};
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.2",
3
+ "version": "26.0.3",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"