@tb-dev/eslint-config 5.5.0 → 5.7.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 +13 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -0
- package/package.json +10 -8
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
|
@@ -22,6 +22,7 @@ declare interface ConfigOptions {
|
|
|
22
22
|
overrides?: {
|
|
23
23
|
javascript?: Rules;
|
|
24
24
|
perfectionist?: Rules;
|
|
25
|
+
svelte?: Rules;
|
|
25
26
|
tailwind?: Rules;
|
|
26
27
|
typescript?: Rules;
|
|
27
28
|
unicorn?: Rules;
|
|
@@ -37,6 +38,8 @@ declare interface FeaturesObject {
|
|
|
37
38
|
/** @default true */
|
|
38
39
|
perfectionist?: boolean;
|
|
39
40
|
/** @default false */
|
|
41
|
+
svelte?: boolean;
|
|
42
|
+
/** @default false */
|
|
40
43
|
tailwind?: boolean;
|
|
41
44
|
/** @default true */
|
|
42
45
|
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.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,23 +20,25 @@
|
|
|
20
20
|
"vue"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^8.18.
|
|
24
|
-
"@typescript-eslint/parser": "^8.18.
|
|
25
|
-
"eslint-plugin-perfectionist": "^4.
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
24
|
+
"@typescript-eslint/parser": "^8.18.2",
|
|
25
|
+
"eslint-plugin-perfectionist": "^4.4.0",
|
|
26
|
+
"eslint-plugin-svelte": "^2.46.1",
|
|
26
27
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
27
28
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
28
29
|
"eslint-plugin-vue": "^9.32.0",
|
|
29
|
-
"globals": "^15.
|
|
30
|
+
"globals": "^15.14.0",
|
|
31
|
+
"svelte-eslint-parser": "^0.43.0",
|
|
30
32
|
"vue-eslint-parser": "^9.4.3"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@types/node": "^22.10.2",
|
|
34
|
-
"eslint": "^9.
|
|
36
|
+
"eslint": "^9.17.0",
|
|
35
37
|
"prettier": "^3.4.2",
|
|
36
38
|
"tslib": "^2.8.1",
|
|
37
39
|
"typescript": "^5.7.2",
|
|
38
|
-
"vite": "^6.0.
|
|
39
|
-
"vite-plugin-dts": "^4.
|
|
40
|
+
"vite": "^6.0.5",
|
|
41
|
+
"vite-plugin-dts": "^4.4.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
44
|
"eslint": "^9.8.0",
|