@tb-dev/eslint-config 5.5.0 → 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,10 +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
+ }
512
522
  const extraFileExtensions = [];
513
523
  if (isEnabled(options.features, "vue")) {
514
524
  extraFileExtensions.push(".vue");
515
525
  }
526
+ if (isEnabled(options.features, "svelte")) {
527
+ extraFileExtensions.push(".svelte");
528
+ }
516
529
  const rules = {
517
530
  "@typescript-eslint/adjacent-overload-signatures": "error",
518
531
  "no-array-constructor": "off",
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,10 +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
+ }
508
518
  const extraFileExtensions = [];
509
519
  if (isEnabled(options.features, "vue")) {
510
520
  extraFileExtensions.push(".vue");
511
521
  }
522
+ if (isEnabled(options.features, "svelte")) {
523
+ extraFileExtensions.push(".svelte");
524
+ }
512
525
  const rules = {
513
526
  "@typescript-eslint/adjacent-overload-signatures": "error",
514
527
  "no-array-constructor": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.10.2",
34
- "eslint": "^9.16.0",
34
+ "eslint": "^9.17.0",
35
35
  "prettier": "^3.4.2",
36
36
  "tslib": "^2.8.1",
37
37
  "typescript": "^5.7.2",