@coderwyd/eslint-config 2.6.0 → 2.6.2
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/README.md +10 -10
- package/dist/cli.cjs +33 -33
- package/dist/cli.js +33 -33
- package/dist/index.cjs +64 -53
- package/dist/index.d.cts +1825 -1667
- package/dist/index.d.ts +1825 -1667
- package/dist/index.js +64 -55
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -71,16 +71,16 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
71
71
|
|
|
72
72
|
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
73
73
|
"eslint.rules.customizations": [
|
|
74
|
-
{ "rule": "style/*", "severity": "off" },
|
|
75
|
-
{ "rule": "format/*", "severity": "off" },
|
|
76
|
-
{ "rule": "*-indent", "severity": "off" },
|
|
77
|
-
{ "rule": "*-spacing", "severity": "off" },
|
|
78
|
-
{ "rule": "*-spaces", "severity": "off" },
|
|
79
|
-
{ "rule": "*-order", "severity": "off" },
|
|
80
|
-
{ "rule": "*-dangle", "severity": "off" },
|
|
81
|
-
{ "rule": "*-newline", "severity": "off" },
|
|
82
|
-
{ "rule": "*quotes", "severity": "off" },
|
|
83
|
-
{ "rule": "*semi", "severity": "off" }
|
|
74
|
+
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
75
|
+
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
76
|
+
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
77
|
+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
78
|
+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
79
|
+
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
80
|
+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
81
|
+
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
82
|
+
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
83
|
+
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
84
84
|
],
|
|
85
85
|
|
|
86
86
|
// Enable eslint for all supported languages
|
package/dist/cli.cjs
CHANGED
|
@@ -30,39 +30,30 @@ module.exports = __toCommonJS(cli_exports);
|
|
|
30
30
|
// src/cli/index.ts
|
|
31
31
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
32
32
|
var import_picocolors3 = __toESM(require("picocolors"), 1);
|
|
33
|
-
var import_helpers = require("yargs/helpers");
|
|
34
33
|
var import_yargs = __toESM(require("yargs"), 1);
|
|
35
|
-
|
|
36
|
-
// src/cli/run.ts
|
|
37
|
-
var import_node_fs = __toESM(require("fs"), 1);
|
|
38
|
-
var import_promises = __toESM(require("fs/promises"), 1);
|
|
39
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
40
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
41
|
-
var import_prompts = __toESM(require("prompts"), 1);
|
|
42
|
-
var import_picocolors2 = __toESM(require("picocolors"), 1);
|
|
43
|
-
var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
34
|
+
var import_helpers = require("yargs/helpers");
|
|
44
35
|
|
|
45
36
|
// src/cli/constants.ts
|
|
46
37
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
47
38
|
|
|
48
39
|
// package.json
|
|
49
|
-
var version = "2.6.
|
|
40
|
+
var version = "2.6.2";
|
|
50
41
|
var devDependencies = {
|
|
51
|
-
"@antfu/ni": "^0.
|
|
52
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
53
|
-
"@eslint/config-inspector": "^0.5.
|
|
42
|
+
"@antfu/ni": "^0.22.0",
|
|
43
|
+
"@eslint-react/eslint-plugin": "^1.5.30",
|
|
44
|
+
"@eslint/config-inspector": "^0.5.2",
|
|
54
45
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
55
|
-
"@types/eslint": "^
|
|
46
|
+
"@types/eslint": "^9.6.0",
|
|
56
47
|
"@types/fs-extra": "^11.0.4",
|
|
57
|
-
"@types/node": "^20.14.
|
|
48
|
+
"@types/node": "^20.14.12",
|
|
58
49
|
"@types/prompts": "^2.4.9",
|
|
59
50
|
"@types/yargs": "^17.0.32",
|
|
60
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
51
|
+
"@unocss/eslint-plugin": "^0.61.6",
|
|
61
52
|
bumpp: "^9.4.1",
|
|
62
|
-
eslint: "^9.
|
|
53
|
+
eslint: "^9.8.0",
|
|
63
54
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
64
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
65
|
-
"eslint-plugin-svelte": "2.
|
|
55
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
56
|
+
"eslint-plugin-svelte": "2.43.0",
|
|
66
57
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
67
58
|
execa: "^9.3.0",
|
|
68
59
|
"fast-glob": "^3.3.2",
|
|
@@ -71,10 +62,10 @@ var devDependencies = {
|
|
|
71
62
|
rimraf: "^6.0.1",
|
|
72
63
|
"simple-git-hooks": "^2.11.1",
|
|
73
64
|
svelte: "^4.2.18",
|
|
74
|
-
"svelte-eslint-parser": "^0.
|
|
75
|
-
tsup: "^8.
|
|
65
|
+
"svelte-eslint-parser": "^0.41.0",
|
|
66
|
+
tsup: "^8.2.3",
|
|
76
67
|
tsx: "^4.16.2",
|
|
77
|
-
typescript: "^5.5.
|
|
68
|
+
typescript: "^5.5.4"
|
|
78
69
|
};
|
|
79
70
|
|
|
80
71
|
// src/cli/constants.ts
|
|
@@ -96,16 +87,16 @@ var vscodeSettingsString = `
|
|
|
96
87
|
|
|
97
88
|
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
98
89
|
"eslint.rules.customizations": [
|
|
99
|
-
{ "rule": "style/*", "severity": "off" },
|
|
100
|
-
{ "rule": "format/*", "severity": "off" },
|
|
101
|
-
{ "rule": "*-indent", "severity": "off" },
|
|
102
|
-
{ "rule": "*-spacing", "severity": "off" },
|
|
103
|
-
{ "rule": "*-spaces", "severity": "off" },
|
|
104
|
-
{ "rule": "*-order", "severity": "off" },
|
|
105
|
-
{ "rule": "*-dangle", "severity": "off" },
|
|
106
|
-
{ "rule": "*-newline", "severity": "off" },
|
|
107
|
-
{ "rule": "*quotes", "severity": "off" },
|
|
108
|
-
{ "rule": "*semi", "severity": "off" }
|
|
90
|
+
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
91
|
+
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
92
|
+
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
93
|
+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
94
|
+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
95
|
+
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
96
|
+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
97
|
+
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
98
|
+
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
99
|
+
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
109
100
|
],
|
|
110
101
|
|
|
111
102
|
// Enable eslint for all supported languages
|
|
@@ -126,6 +117,15 @@ var vscodeSettingsString = `
|
|
|
126
117
|
]
|
|
127
118
|
`;
|
|
128
119
|
|
|
120
|
+
// src/cli/run.ts
|
|
121
|
+
var import_node_fs = __toESM(require("fs"), 1);
|
|
122
|
+
var import_promises = __toESM(require("fs/promises"), 1);
|
|
123
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
124
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
125
|
+
var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
126
|
+
var import_picocolors2 = __toESM(require("picocolors"), 1);
|
|
127
|
+
var import_prompts = __toESM(require("prompts"), 1);
|
|
128
|
+
|
|
129
129
|
// src/cli/utils.ts
|
|
130
130
|
var import_node_child_process = require("child_process");
|
|
131
131
|
function isGitClean() {
|
package/dist/cli.js
CHANGED
|
@@ -1,39 +1,30 @@
|
|
|
1
1
|
// src/cli/index.ts
|
|
2
2
|
import process2 from "node:process";
|
|
3
3
|
import c3 from "picocolors";
|
|
4
|
-
import { hideBin } from "yargs/helpers";
|
|
5
4
|
import yargs from "yargs";
|
|
6
|
-
|
|
7
|
-
// src/cli/run.ts
|
|
8
|
-
import fs from "node:fs";
|
|
9
|
-
import fsp from "node:fs/promises";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import process from "node:process";
|
|
12
|
-
import prompts from "prompts";
|
|
13
|
-
import c2 from "picocolors";
|
|
14
|
-
import parse from "parse-gitignore";
|
|
5
|
+
import { hideBin } from "yargs/helpers";
|
|
15
6
|
|
|
16
7
|
// src/cli/constants.ts
|
|
17
8
|
import c from "picocolors";
|
|
18
9
|
|
|
19
10
|
// package.json
|
|
20
|
-
var version = "2.6.
|
|
11
|
+
var version = "2.6.2";
|
|
21
12
|
var devDependencies = {
|
|
22
|
-
"@antfu/ni": "^0.
|
|
23
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
24
|
-
"@eslint/config-inspector": "^0.5.
|
|
13
|
+
"@antfu/ni": "^0.22.0",
|
|
14
|
+
"@eslint-react/eslint-plugin": "^1.5.30",
|
|
15
|
+
"@eslint/config-inspector": "^0.5.2",
|
|
25
16
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
26
|
-
"@types/eslint": "^
|
|
17
|
+
"@types/eslint": "^9.6.0",
|
|
27
18
|
"@types/fs-extra": "^11.0.4",
|
|
28
|
-
"@types/node": "^20.14.
|
|
19
|
+
"@types/node": "^20.14.12",
|
|
29
20
|
"@types/prompts": "^2.4.9",
|
|
30
21
|
"@types/yargs": "^17.0.32",
|
|
31
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
22
|
+
"@unocss/eslint-plugin": "^0.61.6",
|
|
32
23
|
bumpp: "^9.4.1",
|
|
33
|
-
eslint: "^9.
|
|
24
|
+
eslint: "^9.8.0",
|
|
34
25
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
35
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
36
|
-
"eslint-plugin-svelte": "2.
|
|
26
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
27
|
+
"eslint-plugin-svelte": "2.43.0",
|
|
37
28
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
38
29
|
execa: "^9.3.0",
|
|
39
30
|
"fast-glob": "^3.3.2",
|
|
@@ -42,10 +33,10 @@ var devDependencies = {
|
|
|
42
33
|
rimraf: "^6.0.1",
|
|
43
34
|
"simple-git-hooks": "^2.11.1",
|
|
44
35
|
svelte: "^4.2.18",
|
|
45
|
-
"svelte-eslint-parser": "^0.
|
|
46
|
-
tsup: "^8.
|
|
36
|
+
"svelte-eslint-parser": "^0.41.0",
|
|
37
|
+
tsup: "^8.2.3",
|
|
47
38
|
tsx: "^4.16.2",
|
|
48
|
-
typescript: "^5.5.
|
|
39
|
+
typescript: "^5.5.4"
|
|
49
40
|
};
|
|
50
41
|
|
|
51
42
|
// src/cli/constants.ts
|
|
@@ -67,16 +58,16 @@ var vscodeSettingsString = `
|
|
|
67
58
|
|
|
68
59
|
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
69
60
|
"eslint.rules.customizations": [
|
|
70
|
-
{ "rule": "style/*", "severity": "off" },
|
|
71
|
-
{ "rule": "format/*", "severity": "off" },
|
|
72
|
-
{ "rule": "*-indent", "severity": "off" },
|
|
73
|
-
{ "rule": "*-spacing", "severity": "off" },
|
|
74
|
-
{ "rule": "*-spaces", "severity": "off" },
|
|
75
|
-
{ "rule": "*-order", "severity": "off" },
|
|
76
|
-
{ "rule": "*-dangle", "severity": "off" },
|
|
77
|
-
{ "rule": "*-newline", "severity": "off" },
|
|
78
|
-
{ "rule": "*quotes", "severity": "off" },
|
|
79
|
-
{ "rule": "*semi", "severity": "off" }
|
|
61
|
+
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
62
|
+
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
63
|
+
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
64
|
+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
65
|
+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
66
|
+
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
67
|
+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
68
|
+
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
69
|
+
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
70
|
+
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
80
71
|
],
|
|
81
72
|
|
|
82
73
|
// Enable eslint for all supported languages
|
|
@@ -97,6 +88,15 @@ var vscodeSettingsString = `
|
|
|
97
88
|
]
|
|
98
89
|
`;
|
|
99
90
|
|
|
91
|
+
// src/cli/run.ts
|
|
92
|
+
import fs from "node:fs";
|
|
93
|
+
import fsp from "node:fs/promises";
|
|
94
|
+
import path from "node:path";
|
|
95
|
+
import process from "node:process";
|
|
96
|
+
import parse from "parse-gitignore";
|
|
97
|
+
import c2 from "picocolors";
|
|
98
|
+
import prompts from "prompts";
|
|
99
|
+
|
|
100
100
|
// src/cli/utils.ts
|
|
101
101
|
import { execSync } from "node:child_process";
|
|
102
102
|
function isGitClean() {
|
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,6 @@ __export(src_exports, {
|
|
|
44
44
|
toArray: () => toArray
|
|
45
45
|
});
|
|
46
46
|
module.exports = __toCommonJS(src_exports);
|
|
47
|
-
var import_node_fs = __toESM(require("fs"), 1);
|
|
48
47
|
|
|
49
48
|
// src/plugins/index.ts
|
|
50
49
|
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
@@ -56,7 +55,7 @@ var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-
|
|
|
56
55
|
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
57
56
|
|
|
58
57
|
// src/configs/comments.ts
|
|
59
|
-
|
|
58
|
+
function comments() {
|
|
60
59
|
return [
|
|
61
60
|
{
|
|
62
61
|
name: "coderwyd/eslint-comments/rules",
|
|
@@ -120,6 +119,7 @@ var GLOB_EXCLUDE = [
|
|
|
120
119
|
"**/.vitepress/cache",
|
|
121
120
|
"**/.nuxt",
|
|
122
121
|
"**/.next",
|
|
122
|
+
"**/.svelte-kit",
|
|
123
123
|
"**/.vercel",
|
|
124
124
|
"**/.changeset",
|
|
125
125
|
"**/.idea",
|
|
@@ -137,7 +137,7 @@ var GLOB_EXCLUDE = [
|
|
|
137
137
|
];
|
|
138
138
|
|
|
139
139
|
// src/configs/ignores.ts
|
|
140
|
-
|
|
140
|
+
function ignores() {
|
|
141
141
|
return [
|
|
142
142
|
{
|
|
143
143
|
ignores: GLOB_EXCLUDE
|
|
@@ -146,7 +146,7 @@ async function ignores() {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// src/configs/imports.ts
|
|
149
|
-
|
|
149
|
+
function imports(options = {}) {
|
|
150
150
|
const { stylistic: stylistic2 = true } = options;
|
|
151
151
|
return [
|
|
152
152
|
{
|
|
@@ -165,23 +165,6 @@ async function imports(options = {}) {
|
|
|
165
165
|
"import/no-named-default": "error",
|
|
166
166
|
"import/no-self-import": "error",
|
|
167
167
|
"import/no-webpack-loader-syntax": "error",
|
|
168
|
-
"import/order": [
|
|
169
|
-
"error",
|
|
170
|
-
{
|
|
171
|
-
groups: [
|
|
172
|
-
"builtin",
|
|
173
|
-
"external",
|
|
174
|
-
"internal",
|
|
175
|
-
"parent",
|
|
176
|
-
"sibling",
|
|
177
|
-
"index",
|
|
178
|
-
"object",
|
|
179
|
-
"type"
|
|
180
|
-
],
|
|
181
|
-
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
182
|
-
pathGroupsExcludedImportTypes: ["type"]
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
168
|
...stylistic2 ? {
|
|
186
169
|
"import/newline-after-import": ["error", { count: 1 }]
|
|
187
170
|
} : {}
|
|
@@ -200,7 +183,7 @@ async function imports(options = {}) {
|
|
|
200
183
|
|
|
201
184
|
// src/configs/javascript.ts
|
|
202
185
|
var import_globals = __toESM(require("globals"), 1);
|
|
203
|
-
|
|
186
|
+
function javascript(options = {}) {
|
|
204
187
|
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
205
188
|
return [
|
|
206
189
|
{
|
|
@@ -406,16 +389,8 @@ async function javascript(options = {}) {
|
|
|
406
389
|
"prefer-rest-params": "error",
|
|
407
390
|
"prefer-spread": "error",
|
|
408
391
|
"prefer-template": "error",
|
|
409
|
-
"
|
|
410
|
-
|
|
411
|
-
{
|
|
412
|
-
allowSeparatedGroups: false,
|
|
413
|
-
ignoreCase: false,
|
|
414
|
-
ignoreDeclarationSort: true,
|
|
415
|
-
ignoreMemberSort: false,
|
|
416
|
-
memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
|
|
417
|
-
}
|
|
418
|
-
],
|
|
392
|
+
"require-await": "error",
|
|
393
|
+
"require-yield": "error",
|
|
419
394
|
"symbol-description": "error",
|
|
420
395
|
"unicode-bom": ["error", "never"],
|
|
421
396
|
"unused-imports/no-unused-imports": isInEditor2 ? "off" : "error",
|
|
@@ -670,7 +645,7 @@ async function jsonc(options = {}) {
|
|
|
670
645
|
}
|
|
671
646
|
|
|
672
647
|
// src/configs/node.ts
|
|
673
|
-
|
|
648
|
+
function node() {
|
|
674
649
|
return [
|
|
675
650
|
{
|
|
676
651
|
name: "coderwyd/node/rules",
|
|
@@ -692,7 +667,7 @@ async function node() {
|
|
|
692
667
|
}
|
|
693
668
|
|
|
694
669
|
// src/configs/sort.ts
|
|
695
|
-
|
|
670
|
+
function sortPackageJson() {
|
|
696
671
|
return [
|
|
697
672
|
{
|
|
698
673
|
files: ["**/package.json"],
|
|
@@ -899,6 +874,7 @@ function sortTsconfig() {
|
|
|
899
874
|
"allowSyntheticDefaultImports",
|
|
900
875
|
"esModuleInterop",
|
|
901
876
|
"forceConsistentCasingInFileNames",
|
|
877
|
+
"isolatedDeclarations",
|
|
902
878
|
"isolatedModules",
|
|
903
879
|
"preserveSymlinks",
|
|
904
880
|
"verbatimModuleSyntax",
|
|
@@ -976,7 +952,7 @@ async function typescript(options = {}) {
|
|
|
976
952
|
`${GLOB_MARKDOWN}/**`,
|
|
977
953
|
GLOB_ASTRO_TS
|
|
978
954
|
];
|
|
979
|
-
const tsconfigPath = options
|
|
955
|
+
const tsconfigPath = options.tsconfigPath;
|
|
980
956
|
const isTypeAware = !!tsconfigPath;
|
|
981
957
|
const typeAwareRules = {
|
|
982
958
|
"dot-notation": "off",
|
|
@@ -1059,7 +1035,7 @@ async function typescript(options = {}) {
|
|
|
1059
1035
|
"no-useless-constructor": "off",
|
|
1060
1036
|
"ts/ban-ts-comment": [
|
|
1061
1037
|
"error",
|
|
1062
|
-
{ "ts-
|
|
1038
|
+
{ "ts-expect-error": "allow-with-description" }
|
|
1063
1039
|
],
|
|
1064
1040
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1065
1041
|
"ts/consistent-type-imports": [
|
|
@@ -1070,7 +1046,15 @@ async function typescript(options = {}) {
|
|
|
1070
1046
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1071
1047
|
"ts/no-dupe-class-members": "error",
|
|
1072
1048
|
"ts/no-dynamic-delete": "off",
|
|
1073
|
-
"ts/no-empty-object-type": [
|
|
1049
|
+
"ts/no-empty-object-type": [
|
|
1050
|
+
"error",
|
|
1051
|
+
{
|
|
1052
|
+
allowInterfaces: "with-single-extends",
|
|
1053
|
+
// interface Derived extends Base {}
|
|
1054
|
+
allowObjectTypes: "never",
|
|
1055
|
+
allowWithName: "Props$"
|
|
1056
|
+
}
|
|
1057
|
+
],
|
|
1074
1058
|
"ts/no-explicit-any": "off",
|
|
1075
1059
|
"ts/no-extraneous-class": "off",
|
|
1076
1060
|
"ts/no-import-type-side-effects": "error",
|
|
@@ -1086,7 +1070,6 @@ async function typescript(options = {}) {
|
|
|
1086
1070
|
],
|
|
1087
1071
|
"ts/no-useless-constructor": "off",
|
|
1088
1072
|
"ts/no-wrapper-object-types": "error",
|
|
1089
|
-
"ts/prefer-ts-expect-error": "error",
|
|
1090
1073
|
"ts/triple-slash-reference": "off",
|
|
1091
1074
|
"ts/unified-signatures": "off",
|
|
1092
1075
|
...overrides
|
|
@@ -1132,7 +1115,7 @@ async function typescript(options = {}) {
|
|
|
1132
1115
|
}
|
|
1133
1116
|
|
|
1134
1117
|
// src/configs/unicorn.ts
|
|
1135
|
-
|
|
1118
|
+
function unicorn() {
|
|
1136
1119
|
return [
|
|
1137
1120
|
{
|
|
1138
1121
|
name: "coderwyd/unicorn/rules",
|
|
@@ -1164,6 +1147,7 @@ async function unicorn() {
|
|
|
1164
1147
|
"unicorn/no-hex-escape": "error",
|
|
1165
1148
|
"unicorn/no-instanceof-array": "error",
|
|
1166
1149
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
1150
|
+
"unicorn/no-length-as-slice-end": "error",
|
|
1167
1151
|
"unicorn/no-lonely-if": "error",
|
|
1168
1152
|
"unicorn/no-new-array": "error",
|
|
1169
1153
|
"unicorn/no-new-buffer": "error",
|
|
@@ -1328,7 +1312,7 @@ async function vue(options = {}) {
|
|
|
1328
1312
|
// },
|
|
1329
1313
|
"vue/html-quotes": ["error", "double"],
|
|
1330
1314
|
// ],
|
|
1331
|
-
|
|
1315
|
+
// 'vue/max-attributes-per-line': 'off',
|
|
1332
1316
|
"vue/multi-word-component-names": "off",
|
|
1333
1317
|
// 'vue/next-tick-style': ['warn', 'promise'],
|
|
1334
1318
|
"vue/no-constant-condition": "warn",
|
|
@@ -1471,6 +1455,7 @@ async function test(options = {}) {
|
|
|
1471
1455
|
"test/no-only-tests": isInEditor2 ? "off" : "error",
|
|
1472
1456
|
"test/prefer-hooks-in-order": "error",
|
|
1473
1457
|
"test/prefer-lowercase-title": "error",
|
|
1458
|
+
"ts/explicit-function-return-type": "off",
|
|
1474
1459
|
...overrides
|
|
1475
1460
|
}
|
|
1476
1461
|
}
|
|
@@ -1478,12 +1463,45 @@ async function test(options = {}) {
|
|
|
1478
1463
|
}
|
|
1479
1464
|
|
|
1480
1465
|
// src/configs/perfectionist.ts
|
|
1481
|
-
|
|
1466
|
+
function perfectionist() {
|
|
1482
1467
|
return [
|
|
1483
1468
|
{
|
|
1484
|
-
name: "coderwyd/perfectionist/
|
|
1469
|
+
name: "coderwyd/perfectionist/rules",
|
|
1485
1470
|
plugins: {
|
|
1486
1471
|
perfectionist: import_eslint_plugin_perfectionist.default
|
|
1472
|
+
},
|
|
1473
|
+
rules: {
|
|
1474
|
+
"perfectionist/sort-imports": [
|
|
1475
|
+
"warn",
|
|
1476
|
+
{
|
|
1477
|
+
groups: [
|
|
1478
|
+
"builtin",
|
|
1479
|
+
"external",
|
|
1480
|
+
"internal",
|
|
1481
|
+
"internal-type",
|
|
1482
|
+
"parent",
|
|
1483
|
+
"parent-type",
|
|
1484
|
+
"sibling",
|
|
1485
|
+
"sibling-type",
|
|
1486
|
+
"index",
|
|
1487
|
+
"index-type",
|
|
1488
|
+
"object",
|
|
1489
|
+
"type",
|
|
1490
|
+
"side-effect",
|
|
1491
|
+
"side-effect-style"
|
|
1492
|
+
],
|
|
1493
|
+
internalPattern: ["~/**", "@/**", "#**"],
|
|
1494
|
+
newlinesBetween: "ignore"
|
|
1495
|
+
}
|
|
1496
|
+
],
|
|
1497
|
+
"perfectionist/sort-named-exports": [
|
|
1498
|
+
"warn",
|
|
1499
|
+
{ groupKind: "values-first" }
|
|
1500
|
+
],
|
|
1501
|
+
"perfectionist/sort-named-imports": [
|
|
1502
|
+
"warn",
|
|
1503
|
+
{ groupKind: "values-first" }
|
|
1504
|
+
]
|
|
1487
1505
|
}
|
|
1488
1506
|
}
|
|
1489
1507
|
];
|
|
@@ -1833,7 +1851,6 @@ async function svelte(options = {}) {
|
|
|
1833
1851
|
"svelte/no-useless-mustaches": "error",
|
|
1834
1852
|
"svelte/require-store-callbacks-use-set-param": "error",
|
|
1835
1853
|
"svelte/system": "error",
|
|
1836
|
-
"svelte/valid-compile": "error",
|
|
1837
1854
|
"svelte/valid-each-key": "error",
|
|
1838
1855
|
"unused-imports/no-unused-vars": [
|
|
1839
1856
|
"error",
|
|
@@ -1897,7 +1914,7 @@ async function tailwindcss(options = {}) {
|
|
|
1897
1914
|
|
|
1898
1915
|
// src/configs/command.ts
|
|
1899
1916
|
var import_config = __toESM(require("eslint-plugin-command/config"), 1);
|
|
1900
|
-
|
|
1917
|
+
function command() {
|
|
1901
1918
|
return [
|
|
1902
1919
|
{
|
|
1903
1920
|
...(0, import_config.default)(),
|
|
@@ -1908,7 +1925,7 @@ async function command() {
|
|
|
1908
1925
|
|
|
1909
1926
|
// src/configs/regexp.ts
|
|
1910
1927
|
var import_eslint_plugin_regexp = require("eslint-plugin-regexp");
|
|
1911
|
-
|
|
1928
|
+
function regexp(options = {}) {
|
|
1912
1929
|
const config = import_eslint_plugin_regexp.configs["flat/recommended"];
|
|
1913
1930
|
const rules = {
|
|
1914
1931
|
...config.rules
|
|
@@ -1932,7 +1949,7 @@ async function regexp(options = {}) {
|
|
|
1932
1949
|
}
|
|
1933
1950
|
|
|
1934
1951
|
// src/configs/jsx.ts
|
|
1935
|
-
|
|
1952
|
+
function jsx() {
|
|
1936
1953
|
return [
|
|
1937
1954
|
{
|
|
1938
1955
|
files: [GLOB_JSX, GLOB_TSX],
|
|
@@ -2003,13 +2020,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
2003
2020
|
])
|
|
2004
2021
|
);
|
|
2005
2022
|
} else {
|
|
2006
|
-
|
|
2007
|
-
configs2.push(
|
|
2008
|
-
interopDefault(import("eslint-config-flat-gitignore")).then((r) => [
|
|
2009
|
-
r()
|
|
2010
|
-
])
|
|
2011
|
-
);
|
|
2012
|
-
}
|
|
2023
|
+
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
|
|
2013
2024
|
}
|
|
2014
2025
|
}
|
|
2015
2026
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|