@tb-dev/eslint-config 5.4.22 → 5.6.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.
package/dist/index.cjs CHANGED
@@ -8,6 +8,7 @@ const globals = require('globals');
8
8
  var Glob = /* @__PURE__ */ ((Glob2) => {
9
9
  Glob2["All"] = "**/*.?([cm])[jt]s?(x)";
10
10
  Glob2["Javascript"] = "**/*.?([cm])js?(x)";
11
+ Glob2["Svelte"] = "**/*.svelte";
11
12
  Glob2["Typescript"] = "**/*.?([cm])ts?(x)";
12
13
  Glob2["Vue"] = "**/*.vue";
13
14
  return Glob2;
@@ -19,6 +20,7 @@ var GlobIgnore = /* @__PURE__ */ ((GlobIgnore2) => {
19
20
  GlobIgnore2["Log"] = "**/log?(s)";
20
21
  GlobIgnore2["NodeModules"] = "**/node_modules";
21
22
  GlobIgnore2["Out"] = "**/out";
23
+ GlobIgnore2["SvelteKit"] = "**/.svelte-kit";
22
24
  GlobIgnore2["Target"] = "**/target";
23
25
  GlobIgnore2["Temp"] = "**/?(.)temp";
24
26
  return GlobIgnore2;
@@ -37,6 +39,8 @@ function isEnabled(config, feature) {
37
39
  switch (feature) {
38
40
  case "perfectionist":
39
41
  return config?.perfectionist ?? true;
42
+ case "svelte":
43
+ return config?.svelte ?? false;
40
44
  case "tailwind":
41
45
  return config?.tailwind ?? false;
42
46
  case "unicorn":
@@ -350,6 +354,9 @@ function javascript(options) {
350
354
  if (isEnabled(options.features, "vue")) {
351
355
  files.push(Glob.Vue);
352
356
  }
357
+ if (isEnabled(options.features, "svelte")) {
358
+ files.push(Glob.Svelte);
359
+ }
353
360
  return {
354
361
  files,
355
362
  languageOptions: {
@@ -509,6 +516,16 @@ async function typescript(options) {
509
516
  if (isEnabled(options.features, "vue")) {
510
517
  files.push(Glob.Vue);
511
518
  }
519
+ if (isEnabled(options.features, "svelte")) {
520
+ files.push(Glob.Svelte);
521
+ }
522
+ const extraFileExtensions = [];
523
+ if (isEnabled(options.features, "vue")) {
524
+ extraFileExtensions.push(".vue");
525
+ }
526
+ if (isEnabled(options.features, "svelte")) {
527
+ extraFileExtensions.push(".svelte");
528
+ }
512
529
  const rules = {
513
530
  "@typescript-eslint/adjacent-overload-signatures": "error",
514
531
  "no-array-constructor": "off",
@@ -725,7 +742,13 @@ async function typescript(options) {
725
742
  ],
726
743
  "@typescript-eslint/prefer-optional-chain": "error",
727
744
  "prefer-promise-reject-errors": "off",
728
- "@typescript-eslint/prefer-promise-reject-errors": "error",
745
+ "@typescript-eslint/prefer-promise-reject-errors": [
746
+ "error",
747
+ {
748
+ allowThrowingAny: false,
749
+ allowThrowingUnknown: false
750
+ }
751
+ ],
729
752
  "@typescript-eslint/prefer-readonly": "error",
730
753
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
731
754
  "@typescript-eslint/prefer-reduce-type-parameter": "error",
@@ -753,10 +776,6 @@ async function typescript(options) {
753
776
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
754
777
  ...options.overrides?.typescript
755
778
  };
756
- const extraFileExtensions = [];
757
- if (isEnabled(options.features, "vue")) {
758
- extraFileExtensions.push(".vue");
759
- }
760
779
  return {
761
780
  files,
762
781
  languageOptions: {
package/dist/index.d.ts CHANGED
@@ -37,6 +37,8 @@ declare interface FeaturesObject {
37
37
  /** @default true */
38
38
  perfectionist?: boolean;
39
39
  /** @default false */
40
+ svelte?: boolean;
41
+ /** @default false */
40
42
  tailwind?: boolean;
41
43
  /** @default true */
42
44
  unicorn?: boolean;
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import globals from 'globals';
4
4
  var Glob = /* @__PURE__ */ ((Glob2) => {
5
5
  Glob2["All"] = "**/*.?([cm])[jt]s?(x)";
6
6
  Glob2["Javascript"] = "**/*.?([cm])js?(x)";
7
+ Glob2["Svelte"] = "**/*.svelte";
7
8
  Glob2["Typescript"] = "**/*.?([cm])ts?(x)";
8
9
  Glob2["Vue"] = "**/*.vue";
9
10
  return Glob2;
@@ -15,6 +16,7 @@ var GlobIgnore = /* @__PURE__ */ ((GlobIgnore2) => {
15
16
  GlobIgnore2["Log"] = "**/log?(s)";
16
17
  GlobIgnore2["NodeModules"] = "**/node_modules";
17
18
  GlobIgnore2["Out"] = "**/out";
19
+ GlobIgnore2["SvelteKit"] = "**/.svelte-kit";
18
20
  GlobIgnore2["Target"] = "**/target";
19
21
  GlobIgnore2["Temp"] = "**/?(.)temp";
20
22
  return GlobIgnore2;
@@ -33,6 +35,8 @@ function isEnabled(config, feature) {
33
35
  switch (feature) {
34
36
  case "perfectionist":
35
37
  return config?.perfectionist ?? true;
38
+ case "svelte":
39
+ return config?.svelte ?? false;
36
40
  case "tailwind":
37
41
  return config?.tailwind ?? false;
38
42
  case "unicorn":
@@ -346,6 +350,9 @@ function javascript(options) {
346
350
  if (isEnabled(options.features, "vue")) {
347
351
  files.push(Glob.Vue);
348
352
  }
353
+ if (isEnabled(options.features, "svelte")) {
354
+ files.push(Glob.Svelte);
355
+ }
349
356
  return {
350
357
  files,
351
358
  languageOptions: {
@@ -505,6 +512,16 @@ async function typescript(options) {
505
512
  if (isEnabled(options.features, "vue")) {
506
513
  files.push(Glob.Vue);
507
514
  }
515
+ if (isEnabled(options.features, "svelte")) {
516
+ files.push(Glob.Svelte);
517
+ }
518
+ const extraFileExtensions = [];
519
+ if (isEnabled(options.features, "vue")) {
520
+ extraFileExtensions.push(".vue");
521
+ }
522
+ if (isEnabled(options.features, "svelte")) {
523
+ extraFileExtensions.push(".svelte");
524
+ }
508
525
  const rules = {
509
526
  "@typescript-eslint/adjacent-overload-signatures": "error",
510
527
  "no-array-constructor": "off",
@@ -721,7 +738,13 @@ async function typescript(options) {
721
738
  ],
722
739
  "@typescript-eslint/prefer-optional-chain": "error",
723
740
  "prefer-promise-reject-errors": "off",
724
- "@typescript-eslint/prefer-promise-reject-errors": "error",
741
+ "@typescript-eslint/prefer-promise-reject-errors": [
742
+ "error",
743
+ {
744
+ allowThrowingAny: false,
745
+ allowThrowingUnknown: false
746
+ }
747
+ ],
725
748
  "@typescript-eslint/prefer-readonly": "error",
726
749
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
727
750
  "@typescript-eslint/prefer-reduce-type-parameter": "error",
@@ -749,10 +772,6 @@ async function typescript(options) {
749
772
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
750
773
  ...options.overrides?.typescript
751
774
  };
752
- const extraFileExtensions = [];
753
- if (isEnabled(options.features, "vue")) {
754
- extraFileExtensions.push(".vue");
755
- }
756
775
  return {
757
776
  files,
758
777
  languageOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "5.4.22",
3
+ "version": "5.6.0",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,22 +20,22 @@
20
20
  "vue"
21
21
  ],
22
22
  "dependencies": {
23
- "@typescript-eslint/eslint-plugin": "^8.15.0",
24
- "@typescript-eslint/parser": "^8.15.0",
25
- "eslint-plugin-perfectionist": "^3.9.1",
23
+ "@typescript-eslint/eslint-plugin": "^8.18.0",
24
+ "@typescript-eslint/parser": "^8.18.0",
25
+ "eslint-plugin-perfectionist": "^4.3.0",
26
26
  "eslint-plugin-tailwindcss": "^3.17.5",
27
27
  "eslint-plugin-unicorn": "^56.0.1",
28
- "eslint-plugin-vue": "^9.31.0",
29
- "globals": "^15.12.0",
28
+ "eslint-plugin-vue": "^9.32.0",
29
+ "globals": "^15.13.0",
30
30
  "vue-eslint-parser": "^9.4.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/node": "^22.9.0",
34
- "eslint": "^9.15.0",
35
- "prettier": "^3.3.3",
33
+ "@types/node": "^22.10.2",
34
+ "eslint": "^9.17.0",
35
+ "prettier": "^3.4.2",
36
36
  "tslib": "^2.8.1",
37
- "typescript": "^5.6.3",
38
- "vite": "^5.4.11",
37
+ "typescript": "^5.7.2",
38
+ "vite": "^6.0.3",
39
39
  "vite-plugin-dts": "^4.3.0"
40
40
  },
41
41
  "peerDependencies": {