@tb-dev/eslint-config 6.0.5 → 6.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/dist/index.cjs +11 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -39,6 +39,8 @@ function isEnabled(config, feature) {
|
|
|
39
39
|
switch (feature) {
|
|
40
40
|
case "perfectionist":
|
|
41
41
|
return config?.perfectionist ?? true;
|
|
42
|
+
case "react":
|
|
43
|
+
return config?.react ?? false;
|
|
42
44
|
case "svelte":
|
|
43
45
|
return config?.svelte ?? false;
|
|
44
46
|
case "tailwind":
|
|
@@ -427,6 +429,11 @@ function javascript(options) {
|
|
|
427
429
|
languageOptions: {
|
|
428
430
|
ecmaVersion: "latest",
|
|
429
431
|
sourceType: "module",
|
|
432
|
+
parserOptions: {
|
|
433
|
+
ecmaFeatures: {
|
|
434
|
+
jsx: isEnabled(options.features, "react")
|
|
435
|
+
}
|
|
436
|
+
},
|
|
430
437
|
globals: {
|
|
431
438
|
...globals.browser,
|
|
432
439
|
...globals.es2021,
|
|
@@ -850,7 +857,10 @@ async function typescript(options) {
|
|
|
850
857
|
parserOptions: {
|
|
851
858
|
project: options.project,
|
|
852
859
|
tsconfigRootDir: process.cwd(),
|
|
853
|
-
extraFileExtensions
|
|
860
|
+
extraFileExtensions,
|
|
861
|
+
ecmaFeatures: {
|
|
862
|
+
jsx: isEnabled(options.features, "react")
|
|
863
|
+
}
|
|
854
864
|
}
|
|
855
865
|
},
|
|
856
866
|
plugins: { "@typescript-eslint": tsPlugin },
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,6 +35,8 @@ function isEnabled(config, feature) {
|
|
|
35
35
|
switch (feature) {
|
|
36
36
|
case "perfectionist":
|
|
37
37
|
return config?.perfectionist ?? true;
|
|
38
|
+
case "react":
|
|
39
|
+
return config?.react ?? false;
|
|
38
40
|
case "svelte":
|
|
39
41
|
return config?.svelte ?? false;
|
|
40
42
|
case "tailwind":
|
|
@@ -423,6 +425,11 @@ function javascript(options) {
|
|
|
423
425
|
languageOptions: {
|
|
424
426
|
ecmaVersion: "latest",
|
|
425
427
|
sourceType: "module",
|
|
428
|
+
parserOptions: {
|
|
429
|
+
ecmaFeatures: {
|
|
430
|
+
jsx: isEnabled(options.features, "react")
|
|
431
|
+
}
|
|
432
|
+
},
|
|
426
433
|
globals: {
|
|
427
434
|
...globals.browser,
|
|
428
435
|
...globals.es2021,
|
|
@@ -846,7 +853,10 @@ async function typescript(options) {
|
|
|
846
853
|
parserOptions: {
|
|
847
854
|
project: options.project,
|
|
848
855
|
tsconfigRootDir: process.cwd(),
|
|
849
|
-
extraFileExtensions
|
|
856
|
+
extraFileExtensions,
|
|
857
|
+
ecmaFeatures: {
|
|
858
|
+
jsx: isEnabled(options.features, "react")
|
|
859
|
+
}
|
|
850
860
|
}
|
|
851
861
|
},
|
|
852
862
|
plugins: { "@typescript-eslint": tsPlugin },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/eslint-config",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.7",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"vue"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^8.19.
|
|
24
|
-
"@typescript-eslint/parser": "^8.19.
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
24
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
25
25
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
26
26
|
"eslint-plugin-svelte": "^3.0.0-next.10",
|
|
27
27
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
28
28
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
29
29
|
"eslint-plugin-vue": "^9.32.0",
|
|
30
30
|
"globals": "^15.14.0",
|
|
31
|
-
"svelte": "^5.16.
|
|
31
|
+
"svelte": "^5.16.4",
|
|
32
32
|
"svelte-eslint-parser": "^1.0.0-next.6",
|
|
33
33
|
"vue-eslint-parser": "^9.4.3"
|
|
34
34
|
},
|