@coderwyd/eslint-config 2.1.6 → 2.1.8
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 +0 -1
- package/dist/cli.cjs +5 -5
- package/dist/cli.js +5 -5
- package/dist/index.cjs +98 -13
- package/dist/index.d.cts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.js +98 -13
- package/package.json +20 -20
package/README.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -46,15 +46,15 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
|
46
46
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
47
47
|
|
|
48
48
|
// package.json
|
|
49
|
-
var version = "2.1.
|
|
49
|
+
var version = "2.1.8";
|
|
50
50
|
var devDependencies = {
|
|
51
51
|
"@antfu/ni": "^0.21.12",
|
|
52
52
|
"@types/eslint": "^8.56.2",
|
|
53
53
|
"@types/fs-extra": "^11.0.4",
|
|
54
|
-
"@types/node": "^20.
|
|
54
|
+
"@types/node": "^20.11.19",
|
|
55
55
|
"@types/prompts": "^2.4.9",
|
|
56
56
|
"@types/yargs": "^17.0.32",
|
|
57
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
57
|
+
"@unocss/eslint-plugin": "^0.58.5",
|
|
58
58
|
bumpp: "^9.3.0",
|
|
59
59
|
eslint: "^8.56.0",
|
|
60
60
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
@@ -66,11 +66,11 @@ var devDependencies = {
|
|
|
66
66
|
execa: "^8.0.1",
|
|
67
67
|
"fast-glob": "^3.3.2",
|
|
68
68
|
"fs-extra": "^11.2.0",
|
|
69
|
-
"lint-staged": "^15.2.
|
|
69
|
+
"lint-staged": "^15.2.2",
|
|
70
70
|
rimraf: "^5.0.5",
|
|
71
71
|
"simple-git-hooks": "^2.9.0",
|
|
72
72
|
"svelte-eslint-parser": "^0.33.1",
|
|
73
|
-
tsup: "^8.0.
|
|
73
|
+
tsup: "^8.0.2",
|
|
74
74
|
typescript: "^5.3.3"
|
|
75
75
|
};
|
|
76
76
|
|
package/dist/cli.js
CHANGED
|
@@ -17,15 +17,15 @@ import parse from "parse-gitignore";
|
|
|
17
17
|
import c from "picocolors";
|
|
18
18
|
|
|
19
19
|
// package.json
|
|
20
|
-
var version = "2.1.
|
|
20
|
+
var version = "2.1.8";
|
|
21
21
|
var devDependencies = {
|
|
22
22
|
"@antfu/ni": "^0.21.12",
|
|
23
23
|
"@types/eslint": "^8.56.2",
|
|
24
24
|
"@types/fs-extra": "^11.0.4",
|
|
25
|
-
"@types/node": "^20.
|
|
25
|
+
"@types/node": "^20.11.19",
|
|
26
26
|
"@types/prompts": "^2.4.9",
|
|
27
27
|
"@types/yargs": "^17.0.32",
|
|
28
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
28
|
+
"@unocss/eslint-plugin": "^0.58.5",
|
|
29
29
|
bumpp: "^9.3.0",
|
|
30
30
|
eslint: "^8.56.0",
|
|
31
31
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
@@ -37,11 +37,11 @@ var devDependencies = {
|
|
|
37
37
|
execa: "^8.0.1",
|
|
38
38
|
"fast-glob": "^3.3.2",
|
|
39
39
|
"fs-extra": "^11.2.0",
|
|
40
|
-
"lint-staged": "^15.2.
|
|
40
|
+
"lint-staged": "^15.2.2",
|
|
41
41
|
rimraf: "^5.0.5",
|
|
42
42
|
"simple-git-hooks": "^2.9.0",
|
|
43
43
|
"svelte-eslint-parser": "^0.33.1",
|
|
44
|
-
tsup: "^8.0.
|
|
44
|
+
tsup: "^8.0.2",
|
|
45
45
|
typescript: "^5.3.3"
|
|
46
46
|
};
|
|
47
47
|
|
package/dist/index.cjs
CHANGED
|
@@ -156,10 +156,6 @@ async function imports() {
|
|
|
156
156
|
"antfu/no-import-dist": "error",
|
|
157
157
|
"antfu/no-import-node-modules-by-path": "error",
|
|
158
158
|
"import/first": "error",
|
|
159
|
-
"import/newline-after-import": [
|
|
160
|
-
"error",
|
|
161
|
-
{ considerComments: true, count: 1 }
|
|
162
|
-
],
|
|
163
159
|
"import/no-duplicates": "error",
|
|
164
160
|
"import/no-mutable-exports": "error",
|
|
165
161
|
"import/no-named-default": "error",
|
|
@@ -181,7 +177,14 @@ async function imports() {
|
|
|
181
177
|
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
182
178
|
pathGroupsExcludedImportTypes: ["type"]
|
|
183
179
|
}
|
|
184
|
-
]
|
|
180
|
+
],
|
|
181
|
+
...{
|
|
182
|
+
// format
|
|
183
|
+
"import/newline-after-import": [
|
|
184
|
+
"error",
|
|
185
|
+
{ considerComments: true, count: 1 }
|
|
186
|
+
]
|
|
187
|
+
}
|
|
185
188
|
}
|
|
186
189
|
},
|
|
187
190
|
{
|
|
@@ -442,6 +445,12 @@ async function javascript(options = {}) {
|
|
|
442
445
|
rules: {
|
|
443
446
|
"no-console": "off"
|
|
444
447
|
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
files: ["**/*.{test,spec}.js?(x)"],
|
|
451
|
+
rules: {
|
|
452
|
+
"no-unused-expressions": "off"
|
|
453
|
+
}
|
|
445
454
|
}
|
|
446
455
|
];
|
|
447
456
|
}
|
|
@@ -559,7 +568,12 @@ async function jsdoc() {
|
|
|
559
568
|
"jsdoc/require-property-name": "warn",
|
|
560
569
|
"jsdoc/require-returns-check": "warn",
|
|
561
570
|
"jsdoc/require-returns-description": "warn",
|
|
562
|
-
"jsdoc/require-yields-check": "warn"
|
|
571
|
+
"jsdoc/require-yields-check": "warn",
|
|
572
|
+
...{
|
|
573
|
+
// format
|
|
574
|
+
"jsdoc/check-alignment": "warn",
|
|
575
|
+
"jsdoc/multiline-blocks": "warn"
|
|
576
|
+
}
|
|
563
577
|
}
|
|
564
578
|
}
|
|
565
579
|
];
|
|
@@ -612,6 +626,28 @@ async function jsonc(options = {}) {
|
|
|
612
626
|
"jsonc/space-unary-ops": "error",
|
|
613
627
|
"jsonc/valid-json-number": "error",
|
|
614
628
|
"jsonc/vue-custom-block/no-parsing-error": "error",
|
|
629
|
+
...{
|
|
630
|
+
// format
|
|
631
|
+
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
632
|
+
"jsonc/comma-dangle": ["error", "never"],
|
|
633
|
+
"jsonc/comma-style": ["error", "last"],
|
|
634
|
+
"jsonc/indent": ["error", 2],
|
|
635
|
+
"jsonc/key-spacing": [
|
|
636
|
+
"error",
|
|
637
|
+
{ afterColon: true, beforeColon: false }
|
|
638
|
+
],
|
|
639
|
+
"jsonc/object-curly-newline": [
|
|
640
|
+
"error",
|
|
641
|
+
{ consistent: true, multiline: true }
|
|
642
|
+
],
|
|
643
|
+
"jsonc/object-curly-spacing": ["error", "always"],
|
|
644
|
+
"jsonc/object-property-newline": [
|
|
645
|
+
"error",
|
|
646
|
+
{ allowMultiplePropertiesPerLine: true }
|
|
647
|
+
],
|
|
648
|
+
"jsonc/quote-props": "error",
|
|
649
|
+
"jsonc/quotes": "error"
|
|
650
|
+
},
|
|
615
651
|
...overrides
|
|
616
652
|
}
|
|
617
653
|
}
|
|
@@ -1218,7 +1254,6 @@ async function vue(options = {}) {
|
|
|
1218
1254
|
ignoreConstructors: false
|
|
1219
1255
|
}
|
|
1220
1256
|
],
|
|
1221
|
-
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1222
1257
|
"vue/prefer-separate-static-class": "error",
|
|
1223
1258
|
"vue/prefer-template": "error",
|
|
1224
1259
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
@@ -1227,6 +1262,46 @@ async function vue(options = {}) {
|
|
|
1227
1262
|
"vue/space-infix-ops": "error",
|
|
1228
1263
|
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
1229
1264
|
"vue/valid-define-options": "warn",
|
|
1265
|
+
...{
|
|
1266
|
+
// format
|
|
1267
|
+
"vue/array-bracket-spacing": ["error", "never"],
|
|
1268
|
+
"vue/arrow-spacing": ["error", { after: true, before: true }],
|
|
1269
|
+
"vue/block-spacing": ["error", "always"],
|
|
1270
|
+
"vue/block-tag-newline": [
|
|
1271
|
+
"error",
|
|
1272
|
+
{
|
|
1273
|
+
multiline: "always",
|
|
1274
|
+
singleline: "always"
|
|
1275
|
+
}
|
|
1276
|
+
],
|
|
1277
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
1278
|
+
"vue/comma-dangle": ["error", "always-multiline"],
|
|
1279
|
+
"vue/comma-spacing": ["error", { after: true, before: false }],
|
|
1280
|
+
"vue/comma-style": ["error", "last"],
|
|
1281
|
+
"vue/html-comment-content-spacing": [
|
|
1282
|
+
"error",
|
|
1283
|
+
"always",
|
|
1284
|
+
{
|
|
1285
|
+
exceptions: ["-"]
|
|
1286
|
+
}
|
|
1287
|
+
],
|
|
1288
|
+
"vue/key-spacing": [
|
|
1289
|
+
"error",
|
|
1290
|
+
{ afterColon: true, beforeColon: false }
|
|
1291
|
+
],
|
|
1292
|
+
"vue/keyword-spacing": ["error", { after: true, before: true }],
|
|
1293
|
+
"vue/object-curly-newline": "off",
|
|
1294
|
+
"vue/object-curly-spacing": ["error", "always"],
|
|
1295
|
+
"vue/object-property-newline": [
|
|
1296
|
+
"error",
|
|
1297
|
+
{ allowMultiplePropertiesPerLine: true }
|
|
1298
|
+
],
|
|
1299
|
+
"vue/operator-linebreak": ["error", "before"],
|
|
1300
|
+
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1301
|
+
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
1302
|
+
"vue/space-in-parens": ["error", "never"],
|
|
1303
|
+
"vue/template-curly-spacing": "error"
|
|
1304
|
+
},
|
|
1230
1305
|
...overrides
|
|
1231
1306
|
}
|
|
1232
1307
|
}
|
|
@@ -1411,7 +1486,6 @@ async function formatter(options = {}, prettierRules2 = {}) {
|
|
|
1411
1486
|
css = true,
|
|
1412
1487
|
graphql,
|
|
1413
1488
|
html = true,
|
|
1414
|
-
json = true,
|
|
1415
1489
|
markdown,
|
|
1416
1490
|
toml,
|
|
1417
1491
|
yaml
|
|
@@ -1466,11 +1540,6 @@ async function formatter(options = {}, prettierRules2 = {}) {
|
|
|
1466
1540
|
const lessConfig = createPrettierFormatter([GLOB_LESS], "less");
|
|
1467
1541
|
configs.push(cssConfig, scssConfig, lessConfig);
|
|
1468
1542
|
}
|
|
1469
|
-
if (json) {
|
|
1470
|
-
const jsonConfig = createPrettierFormatter([GLOB_JSON, GLOB_JSONC], "json");
|
|
1471
|
-
const json5Config = createPrettierFormatter([GLOB_JSON5], "json5");
|
|
1472
|
-
configs.push(jsonConfig, json5Config);
|
|
1473
|
-
}
|
|
1474
1543
|
if (markdown) {
|
|
1475
1544
|
const markdownConfig = createPrettierFormatter([GLOB_MARKDOWN], "markdown");
|
|
1476
1545
|
configs.push(markdownConfig);
|
|
@@ -1565,6 +1634,22 @@ async function svelte(options = {}) {
|
|
|
1565
1634
|
varsIgnorePattern: "^(_|\\$\\$Props$)"
|
|
1566
1635
|
}
|
|
1567
1636
|
],
|
|
1637
|
+
...{
|
|
1638
|
+
// format
|
|
1639
|
+
"style/no-trailing-spaces": "off",
|
|
1640
|
+
// superseded by svelte/no-trailing-spaces
|
|
1641
|
+
"svelte/derived-has-same-inputs-outputs": "error",
|
|
1642
|
+
"svelte/html-closing-bracket-spacing": "error",
|
|
1643
|
+
"svelte/html-quotes": ["error", { prefer: "single" }],
|
|
1644
|
+
"svelte/indent": [
|
|
1645
|
+
"error",
|
|
1646
|
+
{ alignAttributesVertically: true, indent: 2 }
|
|
1647
|
+
],
|
|
1648
|
+
"svelte/mustache-spacing": "error",
|
|
1649
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": "error",
|
|
1650
|
+
"svelte/no-trailing-spaces": "error",
|
|
1651
|
+
"svelte/spaced-html-comment": "error"
|
|
1652
|
+
},
|
|
1568
1653
|
...overrides
|
|
1569
1654
|
}
|
|
1570
1655
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -44,10 +44,6 @@ interface OptionsFormatters {
|
|
|
44
44
|
* Enable formatting support for CSS, Less, Sass, and SCSS.
|
|
45
45
|
*/
|
|
46
46
|
css?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Enable formatting support for Json.
|
|
49
|
-
*/
|
|
50
|
-
json?: boolean;
|
|
51
47
|
/**
|
|
52
48
|
* Enable formatting support for Markdown.
|
|
53
49
|
*/
|
|
@@ -208,7 +204,6 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
208
204
|
* {
|
|
209
205
|
* "html": true,
|
|
210
206
|
* "css": true,
|
|
211
|
-
* "json": true,
|
|
212
207
|
* "graphql": false,
|
|
213
208
|
* "markdown": false
|
|
214
209
|
* "yaml": false
|
package/dist/index.d.ts
CHANGED
|
@@ -44,10 +44,6 @@ interface OptionsFormatters {
|
|
|
44
44
|
* Enable formatting support for CSS, Less, Sass, and SCSS.
|
|
45
45
|
*/
|
|
46
46
|
css?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Enable formatting support for Json.
|
|
49
|
-
*/
|
|
50
|
-
json?: boolean;
|
|
51
47
|
/**
|
|
52
48
|
* Enable formatting support for Markdown.
|
|
53
49
|
*/
|
|
@@ -208,7 +204,6 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
208
204
|
* {
|
|
209
205
|
* "html": true,
|
|
210
206
|
* "css": true,
|
|
211
|
-
* "json": true,
|
|
212
207
|
* "graphql": false,
|
|
213
208
|
* "markdown": false
|
|
214
209
|
* "yaml": false
|
package/dist/index.js
CHANGED
|
@@ -122,10 +122,6 @@ async function imports() {
|
|
|
122
122
|
"antfu/no-import-dist": "error",
|
|
123
123
|
"antfu/no-import-node-modules-by-path": "error",
|
|
124
124
|
"import/first": "error",
|
|
125
|
-
"import/newline-after-import": [
|
|
126
|
-
"error",
|
|
127
|
-
{ considerComments: true, count: 1 }
|
|
128
|
-
],
|
|
129
125
|
"import/no-duplicates": "error",
|
|
130
126
|
"import/no-mutable-exports": "error",
|
|
131
127
|
"import/no-named-default": "error",
|
|
@@ -147,7 +143,14 @@ async function imports() {
|
|
|
147
143
|
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
148
144
|
pathGroupsExcludedImportTypes: ["type"]
|
|
149
145
|
}
|
|
150
|
-
]
|
|
146
|
+
],
|
|
147
|
+
...{
|
|
148
|
+
// format
|
|
149
|
+
"import/newline-after-import": [
|
|
150
|
+
"error",
|
|
151
|
+
{ considerComments: true, count: 1 }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
151
154
|
}
|
|
152
155
|
},
|
|
153
156
|
{
|
|
@@ -408,6 +411,12 @@ async function javascript(options = {}) {
|
|
|
408
411
|
rules: {
|
|
409
412
|
"no-console": "off"
|
|
410
413
|
}
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
files: ["**/*.{test,spec}.js?(x)"],
|
|
417
|
+
rules: {
|
|
418
|
+
"no-unused-expressions": "off"
|
|
419
|
+
}
|
|
411
420
|
}
|
|
412
421
|
];
|
|
413
422
|
}
|
|
@@ -525,7 +534,12 @@ async function jsdoc() {
|
|
|
525
534
|
"jsdoc/require-property-name": "warn",
|
|
526
535
|
"jsdoc/require-returns-check": "warn",
|
|
527
536
|
"jsdoc/require-returns-description": "warn",
|
|
528
|
-
"jsdoc/require-yields-check": "warn"
|
|
537
|
+
"jsdoc/require-yields-check": "warn",
|
|
538
|
+
...{
|
|
539
|
+
// format
|
|
540
|
+
"jsdoc/check-alignment": "warn",
|
|
541
|
+
"jsdoc/multiline-blocks": "warn"
|
|
542
|
+
}
|
|
529
543
|
}
|
|
530
544
|
}
|
|
531
545
|
];
|
|
@@ -578,6 +592,28 @@ async function jsonc(options = {}) {
|
|
|
578
592
|
"jsonc/space-unary-ops": "error",
|
|
579
593
|
"jsonc/valid-json-number": "error",
|
|
580
594
|
"jsonc/vue-custom-block/no-parsing-error": "error",
|
|
595
|
+
...{
|
|
596
|
+
// format
|
|
597
|
+
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
598
|
+
"jsonc/comma-dangle": ["error", "never"],
|
|
599
|
+
"jsonc/comma-style": ["error", "last"],
|
|
600
|
+
"jsonc/indent": ["error", 2],
|
|
601
|
+
"jsonc/key-spacing": [
|
|
602
|
+
"error",
|
|
603
|
+
{ afterColon: true, beforeColon: false }
|
|
604
|
+
],
|
|
605
|
+
"jsonc/object-curly-newline": [
|
|
606
|
+
"error",
|
|
607
|
+
{ consistent: true, multiline: true }
|
|
608
|
+
],
|
|
609
|
+
"jsonc/object-curly-spacing": ["error", "always"],
|
|
610
|
+
"jsonc/object-property-newline": [
|
|
611
|
+
"error",
|
|
612
|
+
{ allowMultiplePropertiesPerLine: true }
|
|
613
|
+
],
|
|
614
|
+
"jsonc/quote-props": "error",
|
|
615
|
+
"jsonc/quotes": "error"
|
|
616
|
+
},
|
|
581
617
|
...overrides
|
|
582
618
|
}
|
|
583
619
|
}
|
|
@@ -1184,7 +1220,6 @@ async function vue(options = {}) {
|
|
|
1184
1220
|
ignoreConstructors: false
|
|
1185
1221
|
}
|
|
1186
1222
|
],
|
|
1187
|
-
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1188
1223
|
"vue/prefer-separate-static-class": "error",
|
|
1189
1224
|
"vue/prefer-template": "error",
|
|
1190
1225
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
@@ -1193,6 +1228,46 @@ async function vue(options = {}) {
|
|
|
1193
1228
|
"vue/space-infix-ops": "error",
|
|
1194
1229
|
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
1195
1230
|
"vue/valid-define-options": "warn",
|
|
1231
|
+
...{
|
|
1232
|
+
// format
|
|
1233
|
+
"vue/array-bracket-spacing": ["error", "never"],
|
|
1234
|
+
"vue/arrow-spacing": ["error", { after: true, before: true }],
|
|
1235
|
+
"vue/block-spacing": ["error", "always"],
|
|
1236
|
+
"vue/block-tag-newline": [
|
|
1237
|
+
"error",
|
|
1238
|
+
{
|
|
1239
|
+
multiline: "always",
|
|
1240
|
+
singleline: "always"
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1243
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
1244
|
+
"vue/comma-dangle": ["error", "always-multiline"],
|
|
1245
|
+
"vue/comma-spacing": ["error", { after: true, before: false }],
|
|
1246
|
+
"vue/comma-style": ["error", "last"],
|
|
1247
|
+
"vue/html-comment-content-spacing": [
|
|
1248
|
+
"error",
|
|
1249
|
+
"always",
|
|
1250
|
+
{
|
|
1251
|
+
exceptions: ["-"]
|
|
1252
|
+
}
|
|
1253
|
+
],
|
|
1254
|
+
"vue/key-spacing": [
|
|
1255
|
+
"error",
|
|
1256
|
+
{ afterColon: true, beforeColon: false }
|
|
1257
|
+
],
|
|
1258
|
+
"vue/keyword-spacing": ["error", { after: true, before: true }],
|
|
1259
|
+
"vue/object-curly-newline": "off",
|
|
1260
|
+
"vue/object-curly-spacing": ["error", "always"],
|
|
1261
|
+
"vue/object-property-newline": [
|
|
1262
|
+
"error",
|
|
1263
|
+
{ allowMultiplePropertiesPerLine: true }
|
|
1264
|
+
],
|
|
1265
|
+
"vue/operator-linebreak": ["error", "before"],
|
|
1266
|
+
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1267
|
+
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
1268
|
+
"vue/space-in-parens": ["error", "never"],
|
|
1269
|
+
"vue/template-curly-spacing": "error"
|
|
1270
|
+
},
|
|
1196
1271
|
...overrides
|
|
1197
1272
|
}
|
|
1198
1273
|
}
|
|
@@ -1377,7 +1452,6 @@ async function formatter(options = {}, prettierRules2 = {}) {
|
|
|
1377
1452
|
css = true,
|
|
1378
1453
|
graphql,
|
|
1379
1454
|
html = true,
|
|
1380
|
-
json = true,
|
|
1381
1455
|
markdown,
|
|
1382
1456
|
toml,
|
|
1383
1457
|
yaml
|
|
@@ -1432,11 +1506,6 @@ async function formatter(options = {}, prettierRules2 = {}) {
|
|
|
1432
1506
|
const lessConfig = createPrettierFormatter([GLOB_LESS], "less");
|
|
1433
1507
|
configs.push(cssConfig, scssConfig, lessConfig);
|
|
1434
1508
|
}
|
|
1435
|
-
if (json) {
|
|
1436
|
-
const jsonConfig = createPrettierFormatter([GLOB_JSON, GLOB_JSONC], "json");
|
|
1437
|
-
const json5Config = createPrettierFormatter([GLOB_JSON5], "json5");
|
|
1438
|
-
configs.push(jsonConfig, json5Config);
|
|
1439
|
-
}
|
|
1440
1509
|
if (markdown) {
|
|
1441
1510
|
const markdownConfig = createPrettierFormatter([GLOB_MARKDOWN], "markdown");
|
|
1442
1511
|
configs.push(markdownConfig);
|
|
@@ -1531,6 +1600,22 @@ async function svelte(options = {}) {
|
|
|
1531
1600
|
varsIgnorePattern: "^(_|\\$\\$Props$)"
|
|
1532
1601
|
}
|
|
1533
1602
|
],
|
|
1603
|
+
...{
|
|
1604
|
+
// format
|
|
1605
|
+
"style/no-trailing-spaces": "off",
|
|
1606
|
+
// superseded by svelte/no-trailing-spaces
|
|
1607
|
+
"svelte/derived-has-same-inputs-outputs": "error",
|
|
1608
|
+
"svelte/html-closing-bracket-spacing": "error",
|
|
1609
|
+
"svelte/html-quotes": ["error", { prefer: "single" }],
|
|
1610
|
+
"svelte/indent": [
|
|
1611
|
+
"error",
|
|
1612
|
+
{ alignAttributesVertically: true, indent: 2 }
|
|
1613
|
+
],
|
|
1614
|
+
"svelte/mustache-spacing": "error",
|
|
1615
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": "error",
|
|
1616
|
+
"svelte/no-trailing-spaces": "error",
|
|
1617
|
+
"svelte/spaced-html-comment": "error"
|
|
1618
|
+
},
|
|
1534
1619
|
...overrides
|
|
1535
1620
|
}
|
|
1536
1621
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "2.1.8",
|
|
5
|
+
"packageManager": "pnpm@8.15.3",
|
|
6
6
|
"description": "Donny's ESLint config",
|
|
7
7
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"eslint-config-svelte",
|
|
16
16
|
"prettier"
|
|
17
17
|
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
18
21
|
"exports": {
|
|
19
22
|
".": {
|
|
20
23
|
"types": "./dist/index.d.ts",
|
|
@@ -30,9 +33,6 @@
|
|
|
30
33
|
"bin",
|
|
31
34
|
"dist"
|
|
32
35
|
],
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public"
|
|
35
|
-
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=16.14.0"
|
|
38
38
|
},
|
|
@@ -68,33 +68,33 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@antfu/eslint-define-config": "1.23.0-2",
|
|
70
70
|
"@antfu/install-pkg": "^0.3.1",
|
|
71
|
-
"@eslint-types/jsdoc": "48.0.
|
|
72
|
-
"@eslint-types/typescript-eslint": "^6.
|
|
73
|
-
"@eslint-types/unicorn": "^
|
|
71
|
+
"@eslint-types/jsdoc": "48.0.6",
|
|
72
|
+
"@eslint-types/typescript-eslint": "^6.21.0",
|
|
73
|
+
"@eslint-types/unicorn": "^51.0.1",
|
|
74
74
|
"@toml-tools/parser": "^1.0.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
76
|
-
"@typescript-eslint/parser": "^
|
|
77
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
76
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
77
|
+
"eslint-config-flat-gitignore": "^0.1.3",
|
|
78
78
|
"eslint-config-prettier": "^9.1.0",
|
|
79
79
|
"eslint-plugin-antfu": "^2.1.2",
|
|
80
80
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
81
81
|
"eslint-plugin-i": "^2.29.1",
|
|
82
|
-
"eslint-plugin-jsdoc": "^48.0
|
|
82
|
+
"eslint-plugin-jsdoc": "^48.1.0",
|
|
83
83
|
"eslint-plugin-jsonc": "^2.13.0",
|
|
84
84
|
"eslint-plugin-n": "^16.6.2",
|
|
85
85
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
86
86
|
"eslint-plugin-perfectionist": "^2.5.0",
|
|
87
87
|
"eslint-plugin-prettier": "^5.1.3",
|
|
88
|
-
"eslint-plugin-unicorn": "^
|
|
88
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
|
89
89
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
90
|
-
"eslint-plugin-vitest": "^0.3.
|
|
90
|
+
"eslint-plugin-vitest": "^0.3.22",
|
|
91
91
|
"eslint-plugin-vue": "^9.21.1",
|
|
92
|
-
"globals": "^
|
|
92
|
+
"globals": "^14.0.0",
|
|
93
93
|
"jsonc-eslint-parser": "^2.4.0",
|
|
94
94
|
"local-pkg": "^0.5.0",
|
|
95
95
|
"parse-gitignore": "^2.0.0",
|
|
96
96
|
"picocolors": "^1.0.0",
|
|
97
|
-
"prettier": "^3.2.
|
|
97
|
+
"prettier": "^3.2.5",
|
|
98
98
|
"prettier-plugin-toml": "^2.0.1",
|
|
99
99
|
"prompts": "^2.4.2",
|
|
100
100
|
"vue-eslint-parser": "^9.4.2",
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
"@antfu/ni": "^0.21.12",
|
|
105
105
|
"@types/eslint": "^8.56.2",
|
|
106
106
|
"@types/fs-extra": "^11.0.4",
|
|
107
|
-
"@types/node": "^20.
|
|
107
|
+
"@types/node": "^20.11.19",
|
|
108
108
|
"@types/prompts": "^2.4.9",
|
|
109
109
|
"@types/yargs": "^17.0.32",
|
|
110
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
110
|
+
"@unocss/eslint-plugin": "^0.58.5",
|
|
111
111
|
"bumpp": "^9.3.0",
|
|
112
112
|
"eslint": "^8.56.0",
|
|
113
113
|
"eslint-flat-config-viewer": "^0.1.11",
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
"execa": "^8.0.1",
|
|
120
120
|
"fast-glob": "^3.3.2",
|
|
121
121
|
"fs-extra": "^11.2.0",
|
|
122
|
-
"lint-staged": "^15.2.
|
|
122
|
+
"lint-staged": "^15.2.2",
|
|
123
123
|
"rimraf": "^5.0.5",
|
|
124
124
|
"simple-git-hooks": "^2.9.0",
|
|
125
125
|
"svelte-eslint-parser": "^0.33.1",
|
|
126
|
-
"tsup": "^8.0.
|
|
126
|
+
"tsup": "^8.0.2",
|
|
127
127
|
"typescript": "^5.3.3"
|
|
128
128
|
},
|
|
129
129
|
"simple-git-hooks": {
|