@kitschpatrol/eslint-config 5.0.6 → 5.0.7

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/bin/cli.js CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { createRequire } from "module";
3
+ const require = createRequire(import.meta.url);
2
4
  var __create = Object.create;
3
5
  var __defProp = Object.defineProperty;
4
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -635,7 +637,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
635
637
  // ../../node_modules/.pnpm/package-up@5.0.0/node_modules/package-up/index.js
636
638
  import process4 from "node:process";
637
639
 
638
- // ../../node_modules/.pnpm/find-up-simple@1.0.0/node_modules/find-up-simple/index.js
640
+ // ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
639
641
  import process3 from "node:process";
640
642
  import fsPromises from "node:fs/promises";
641
643
  import { fileURLToPath } from "node:url";
@@ -650,8 +652,9 @@ async function findUp(name, {
650
652
  let directory = path.resolve(toPath(cwd) ?? "");
651
653
  const { root } = path.parse(directory);
652
654
  stopAt = path.resolve(directory, toPath(stopAt ?? root));
653
- while (directory && directory !== stopAt && directory !== root) {
654
- const filePath = path.isAbsolute(name) ? name : path.join(directory, name);
655
+ const isAbsoluteName = path.isAbsolute(name);
656
+ while (directory) {
657
+ const filePath = isAbsoluteName ? name : path.join(directory, name);
655
658
  try {
656
659
  const stats = await fsPromises.stat(filePath);
657
660
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
@@ -659,6 +662,9 @@ async function findUp(name, {
659
662
  }
660
663
  } catch {
661
664
  }
665
+ if (directory === stopAt || directory === root) {
666
+ break;
667
+ }
662
668
  directory = path.dirname(directory);
663
669
  }
664
670
  }
@@ -670,8 +676,9 @@ function findUpSync(name, {
670
676
  let directory = path.resolve(toPath(cwd) ?? "");
671
677
  const { root } = path.parse(directory);
672
678
  stopAt = path.resolve(directory, toPath(stopAt) ?? root);
673
- while (directory && directory !== stopAt && directory !== root) {
674
- const filePath = path.isAbsolute(name) ? name : path.join(directory, name);
679
+ const isAbsoluteName = path.isAbsolute(name);
680
+ while (directory) {
681
+ const filePath = isAbsoluteName ? name : path.join(directory, name);
675
682
  try {
676
683
  const stats = fs.statSync(filePath, { throwIfNoEntry: false });
677
684
  if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) {
@@ -679,6 +686,9 @@ function findUpSync(name, {
679
686
  }
680
687
  } catch {
681
688
  }
689
+ if (directory === stopAt || directory === root) {
690
+ break;
691
+ }
682
692
  directory = path.dirname(directory);
683
693
  }
684
694
  }
@@ -5541,7 +5551,7 @@ var Yargs = YargsFactory(esm_default);
5541
5551
  var yargs_default = Yargs;
5542
5552
 
5543
5553
  // ../../package.json
5544
- var version = "5.0.6";
5554
+ var version = "5.0.7";
5545
5555
 
5546
5556
  // ../../src/execa-utilities.ts
5547
5557
  function isErrorExecaError(error) {
package/dist/index.d.ts CHANGED
@@ -3237,6 +3237,11 @@ interface RuleOptions {
3237
3237
  * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
3238
3238
  */
3239
3239
  'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
3240
+ /**
3241
+ * warns against using `flushSync`
3242
+ * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
3243
+ */
3244
+ 'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
3240
3245
  /**
3241
3246
  * enforce that button component have an explicit 'type' attribute
3242
3247
  * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
@@ -3337,6 +3342,11 @@ interface RuleOptions {
3337
3342
  * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
3338
3343
  */
3339
3344
  'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
3345
+ /**
3346
+ * enforce context name to end with `Context`.
3347
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
3348
+ */
3349
+ 'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
3340
3350
  /**
3341
3351
  * enforce naming convention for JSX filenames
3342
3352
  * @see https://eslint-react.xyz/docs/rules/naming-convention-filename
@@ -4178,6 +4188,11 @@ interface RuleOptions {
4178
4188
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
4179
4189
  */
4180
4190
  'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>
4191
+ /**
4192
+ * enforce a consistent style for CSS selectors
4193
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
4194
+ */
4195
+ 'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>
4181
4196
  /**
4182
4197
  * derived store should use same variable names between values and callback
4183
4198
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
@@ -4276,6 +4291,7 @@ interface RuleOptions {
4276
4291
  /**
4277
4292
  * disallow dynamic slot name
4278
4293
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
4294
+ * @deprecated
4279
4295
  */
4280
4296
  'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>
4281
4297
  /**
@@ -4291,6 +4307,7 @@ interface RuleOptions {
4291
4307
  /**
4292
4308
  * disallow using goto() without the base path
4293
4309
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
4310
+ * @deprecated
4294
4311
  */
4295
4312
  'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>
4296
4313
  /**
@@ -4318,6 +4335,11 @@ interface RuleOptions {
4318
4335
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
4319
4336
  */
4320
4337
  'svelte/no-inspect'?: Linter.RuleEntry<[]>
4338
+ /**
4339
+ * disallow using navigation (links, goto, pushState, replaceState) without the base path
4340
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
4341
+ */
4342
+ 'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
4321
4343
  /**
4322
4344
  * disallow use of not function in event handler
4323
4345
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
@@ -4328,6 +4350,11 @@ interface RuleOptions {
4328
4350
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
4329
4351
  */
4330
4352
  'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
4353
+ /**
4354
+ * Checks for invalid raw HTML elements
4355
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
4356
+ */
4357
+ 'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>
4331
4358
  /**
4332
4359
  * it's not necessary to define functions in reactive statements
4333
4360
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
@@ -4393,6 +4420,11 @@ interface RuleOptions {
4393
4420
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
4394
4421
  */
4395
4422
  'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>
4423
+ /**
4424
+ * disallow explicit children snippet where it's not needed
4425
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
4426
+ */
4427
+ 'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>
4396
4428
  /**
4397
4429
  * disallow unnecessary mustache interpolations
4398
4430
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
@@ -4403,6 +4435,11 @@ interface RuleOptions {
4403
4435
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
4404
4436
  */
4405
4437
  'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>
4438
+ /**
4439
+ * Require `const` declarations for variables that are never reassigned after declared
4440
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
4441
+ */
4442
+ 'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>
4406
4443
  /**
4407
4444
  * destructure values from object stores for better change tracking & fewer redraws
4408
4445
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
@@ -4483,6 +4520,11 @@ interface RuleOptions {
4483
4520
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
4484
4521
  */
4485
4522
  'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>
4523
+ /**
4524
+ * require valid style element parsing
4525
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
4526
+ */
4527
+ 'svelte/valid-style-parse'?: Linter.RuleEntry<[]>
4486
4528
  /**
4487
4529
  * Enforce spacing around colons of switch statements
4488
4530
  * @see https://eslint.org/docs/latest/rules/switch-colon-spacing
@@ -11225,7 +11267,23 @@ type NodeNoSync =
11225
11267
  | [
11226
11268
  {
11227
11269
  allowAtRootLevel?: boolean
11228
- ignores?: string[]
11270
+ ignores?: (
11271
+ | string
11272
+ | {
11273
+ from?: 'file'
11274
+ path?: string
11275
+ name?: string[]
11276
+ }
11277
+ | {
11278
+ from?: 'lib'
11279
+ name?: string[]
11280
+ }
11281
+ | {
11282
+ from?: 'package'
11283
+ package?: string
11284
+ name?: string[]
11285
+ }
11286
+ )[]
11229
11287
  },
11230
11288
  ]
11231
11289
  // ----- node/no-unpublished-bin -----
@@ -17379,6 +17437,20 @@ type SvelteCommentDirective =
17379
17437
  reportUnusedDisableDirectives?: boolean
17380
17438
  },
17381
17439
  ]
17440
+ // ----- svelte/consistent-selector-style -----
17441
+ type SvelteConsistentSelectorStyle =
17442
+ | []
17443
+ | [
17444
+ {
17445
+ checkGlobal?: boolean
17446
+
17447
+ style?:
17448
+ | []
17449
+ | ['class' | 'id' | 'type']
17450
+ | ['class' | 'id' | 'type', 'class' | 'id' | 'type']
17451
+ | ['class' | 'id' | 'type', 'class' | 'id' | 'type', 'class' | 'id' | 'type']
17452
+ },
17453
+ ]
17382
17454
  // ----- svelte/first-attribute-linebreak -----
17383
17455
  type SvelteFirstAttributeLinebreak =
17384
17456
  | []
@@ -17430,7 +17502,8 @@ type SvelteHtmlSelfClosing =
17430
17502
  | {
17431
17503
  void?: 'never' | 'always' | 'ignore'
17432
17504
  normal?: 'never' | 'always' | 'ignore'
17433
- foreign?: 'never' | 'always' | 'ignore'
17505
+ svg?: 'never' | 'always' | 'ignore'
17506
+ math?: 'never' | 'always' | 'ignore'
17434
17507
  component?: 'never' | 'always' | 'ignore'
17435
17508
  svelte?: 'never' | 'always' | 'ignore'
17436
17509
  }
@@ -17493,6 +17566,17 @@ type SvelteNoInnerDeclarations =
17493
17566
  blockScopedFunctions?: 'allow' | 'disallow'
17494
17567
  },
17495
17568
  ]
17569
+ // ----- svelte/no-navigation-without-base -----
17570
+ type SvelteNoNavigationWithoutBase =
17571
+ | []
17572
+ | [
17573
+ {
17574
+ ignoreGoto?: boolean
17575
+ ignoreLinks?: boolean
17576
+ ignorePushState?: boolean
17577
+ ignoreReplaceState?: boolean
17578
+ },
17579
+ ]
17496
17580
  // ----- svelte/no-reactive-reassign -----
17497
17581
  type SvelteNoReactiveReassign =
17498
17582
  | []
@@ -17570,6 +17654,15 @@ type SveltePreferClassDirective =
17570
17654
  prefer?: 'always' | 'empty'
17571
17655
  },
17572
17656
  ]
17657
+ // ----- svelte/prefer-const -----
17658
+ type SveltePreferConst =
17659
+ | []
17660
+ | [
17661
+ {
17662
+ destructuring?: 'any' | 'all'
17663
+ ignoreReadBeforeAssign?: boolean
17664
+ },
17665
+ ]
17573
17666
  // ----- svelte/shorthand-attribute -----
17574
17667
  type SvelteShorthandAttribute =
17575
17668
  | []
package/dist/index.js CHANGED
@@ -1437,21 +1437,40 @@ var regexpRecommendedRules = {
1437
1437
 
1438
1438
  // src/presets/svelte.ts
1439
1439
  var svelteRecommendedRules = {
1440
- // Begin expansion 'eslint-plugin-svelte' 'recommended'
1440
+ // Brittle since there's no negative index access in dot-prop
1441
+ // Begin expansion 'eslint-plugin-svelte' 'flat/recommended[3]'
1441
1442
  "svelte/comment-directive": "error",
1443
+ "svelte/infinite-reactive-loop": "error",
1442
1444
  "svelte/no-at-debug-tags": "warn",
1443
1445
  "svelte/no-at-html-tags": "error",
1446
+ "svelte/no-dom-manipulating": "error",
1444
1447
  "svelte/no-dupe-else-if-blocks": "error",
1448
+ "svelte/no-dupe-on-directives": "error",
1445
1449
  "svelte/no-dupe-style-properties": "error",
1446
- "svelte/no-dynamic-slot-name": "error",
1450
+ "svelte/no-dupe-use-directives": "error",
1451
+ "svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
1452
+ "svelte/no-immutable-reactive-statements": "error",
1447
1453
  "svelte/no-inner-declarations": "error",
1454
+ "svelte/no-inspect": "warn",
1448
1455
  "svelte/no-not-function-handler": "error",
1449
1456
  "svelte/no-object-in-text-mustaches": "error",
1457
+ "svelte/no-raw-special-elements": "error",
1458
+ "svelte/no-reactive-functions": "error",
1459
+ "svelte/no-reactive-literals": "error",
1460
+ "svelte/no-reactive-reassign": "error",
1450
1461
  "svelte/no-shorthand-style-property-overrides": "error",
1462
+ "svelte/no-store-async": "error",
1463
+ "svelte/no-svelte-internal": "error",
1451
1464
  "svelte/no-unknown-style-directive-property": "error",
1452
1465
  "svelte/no-unused-svelte-ignore": "error",
1466
+ "svelte/no-useless-children-snippet": "error",
1467
+ "svelte/no-useless-mustaches": "error",
1468
+ "svelte/require-each-key": "error",
1469
+ "svelte/require-event-dispatcher-types": "error",
1470
+ "svelte/require-store-reactive-access": "error",
1453
1471
  "svelte/system": "error",
1454
- "svelte/valid-compile": "error"
1472
+ "svelte/valid-each-key": "error",
1473
+ "svelte/valid-prop-names-in-kit-pages": "error"
1455
1474
  // End expansion
1456
1475
  };
1457
1476
 
@@ -2456,6 +2475,8 @@ var sharedScriptConfig = {
2456
2475
  modifiers: ["const", "exported"],
2457
2476
  // Allow UPPER_CASE const exports
2458
2477
  selector: "variable"
2478
+ // Not objects...
2479
+ // types: ['boolean', 'string', 'number', 'array'],
2459
2480
  }
2460
2481
  // {
2461
2482
  // filter: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/eslint-config",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "ESLint configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -42,13 +42,13 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
45
- "@eslint-react/eslint-plugin": "^1.27.0",
45
+ "@eslint-react/eslint-plugin": "^1.29.0",
46
46
  "@html-eslint/eslint-plugin": "^0.35.0",
47
47
  "@html-eslint/parser": "^0.35.0",
48
48
  "@pinojs/json-colorizer": "^4.0.0",
49
49
  "@typescript-eslint/eslint-plugin": "^8.25.0",
50
50
  "@typescript-eslint/parser": "^8.25.0",
51
- "@vitest/eslint-plugin": "^1.1.33",
51
+ "@vitest/eslint-plugin": "^1.1.36",
52
52
  "astro-eslint-parser": "^1.2.1",
53
53
  "eslint": "^9.21.0",
54
54
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -63,12 +63,12 @@
63
63
  "eslint-plugin-jsonc": "^2.19.1",
64
64
  "eslint-plugin-jsx-a11y": "^6.10.2",
65
65
  "eslint-plugin-mdx": "^3.1.5",
66
- "eslint-plugin-n": "^17.15.1",
66
+ "eslint-plugin-n": "^17.16.1",
67
67
  "eslint-plugin-no-only-tests": "^3.3.0",
68
- "eslint-plugin-package-json": "^0.26.0",
68
+ "eslint-plugin-package-json": "^0.26.1",
69
69
  "eslint-plugin-perfectionist": "^4.9.0",
70
70
  "eslint-plugin-regexp": "^2.7.0",
71
- "eslint-plugin-svelte": "^2.46.1",
71
+ "eslint-plugin-svelte": "^3.0.2",
72
72
  "eslint-plugin-toml": "^0.12.0",
73
73
  "eslint-plugin-unicorn": "^57.0.0",
74
74
  "eslint-plugin-yml": "^1.17.0",
@@ -77,26 +77,26 @@
77
77
  "fs-extra": "^11.3.0",
78
78
  "globals": "^16.0.0",
79
79
  "jsonc-eslint-parser": "^2.4.0",
80
- "local-pkg": "^1.0.0",
80
+ "local-pkg": "^1.1.0",
81
81
  "prettier": "^3.5.2",
82
- "sort-package-json": "^2.14.0",
83
- "svelte-eslint-parser": "^0.43.0",
82
+ "sort-package-json": "^2.15.1",
83
+ "svelte-eslint-parser": "^1.0.0",
84
84
  "toml-eslint-parser": "^0.10.0",
85
- "yaml-eslint-parser": "^1.2.3"
85
+ "yaml-eslint-parser": "^1.3.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@types/eslint-config-prettier": "^6.11.3",
89
89
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
90
90
  "dot-prop": "^9.0.0",
91
- "eslint-config-prettier": "^10.0.1",
91
+ "eslint-config-prettier": "^10.0.2",
92
92
  "eslint-config-xo-typescript": "^7.0.0",
93
93
  "eslint-typegen": "^2.0.0",
94
- "svelte": "^5.20.4",
94
+ "globby": "^14.1.0",
95
+ "svelte": "^5.20.5",
95
96
  "tsup": "^8.4.0"
96
97
  },
97
98
  "engines": {
98
- "node": ">=22.13.1",
99
- "pnpm": ">=10.0.0"
99
+ "node": ">=20.9.0"
100
100
  },
101
101
  "publishConfig": {
102
102
  "access": "public"