@antfu/eslint-config 3.7.1 → 3.7.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/dist/cli.cjs +12 -12
- package/dist/cli.js +12 -12
- package/dist/index.cjs +32 -33
- package/dist/index.d.cts +90 -46
- package/dist/index.d.ts +90 -46
- package/dist/index.js +31 -32
- package/package.json +13 -13
package/dist/cli.cjs
CHANGED
|
@@ -41,7 +41,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
41
41
|
var package_default = {
|
|
42
42
|
name: "@antfu/eslint-config",
|
|
43
43
|
type: "module",
|
|
44
|
-
version: "3.7.
|
|
44
|
+
version: "3.7.2",
|
|
45
45
|
packageManager: "pnpm@9.11.0",
|
|
46
46
|
description: "Anthony's ESLint config",
|
|
47
47
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -141,20 +141,20 @@ var package_default = {
|
|
|
141
141
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
142
142
|
"@eslint/markdown": "^6.1.0",
|
|
143
143
|
"@stylistic/eslint-plugin": "^2.8.0",
|
|
144
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
145
|
-
"@typescript-eslint/parser": "^8.
|
|
144
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
145
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
146
146
|
"@vitest/eslint-plugin": "^1.1.4",
|
|
147
147
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
148
148
|
"eslint-flat-config-utils": "^0.4.0",
|
|
149
149
|
"eslint-merge-processors": "^0.1.0",
|
|
150
150
|
"eslint-plugin-antfu": "^2.7.0",
|
|
151
151
|
"eslint-plugin-command": "^0.2.5",
|
|
152
|
-
"eslint-plugin-import-x": "^4.
|
|
153
|
-
"eslint-plugin-jsdoc": "^50.2.
|
|
152
|
+
"eslint-plugin-import-x": "^4.3.0",
|
|
153
|
+
"eslint-plugin-jsdoc": "^50.2.5",
|
|
154
154
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
155
155
|
"eslint-plugin-n": "^17.10.3",
|
|
156
156
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
157
|
-
"eslint-plugin-perfectionist": "^3.
|
|
157
|
+
"eslint-plugin-perfectionist": "^3.7.0",
|
|
158
158
|
"eslint-plugin-regexp": "^2.6.0",
|
|
159
159
|
"eslint-plugin-toml": "^0.11.1",
|
|
160
160
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
@@ -180,13 +180,13 @@ var package_default = {
|
|
|
180
180
|
"@prettier/plugin-xml": "^3.4.1",
|
|
181
181
|
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
182
182
|
"@types/fs-extra": "^11.0.4",
|
|
183
|
-
"@types/node": "^22.
|
|
183
|
+
"@types/node": "^22.7.2",
|
|
184
184
|
"@types/prompts": "^2.4.9",
|
|
185
185
|
"@types/yargs": "^17.0.33",
|
|
186
186
|
"@unocss/eslint-plugin": "^0.62.4",
|
|
187
187
|
"astro-eslint-parser": "^1.0.3",
|
|
188
188
|
bumpp: "^9.5.2",
|
|
189
|
-
eslint: "^9.
|
|
189
|
+
eslint: "^9.11.1",
|
|
190
190
|
"eslint-plugin-astro": "^1.2.4",
|
|
191
191
|
"eslint-plugin-format": "^0.1.2",
|
|
192
192
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
@@ -198,7 +198,7 @@ var package_default = {
|
|
|
198
198
|
execa: "^9.4.0",
|
|
199
199
|
"fast-glob": "^3.3.2",
|
|
200
200
|
"fs-extra": "^11.2.0",
|
|
201
|
-
jiti: "^
|
|
201
|
+
jiti: "^2.0.0",
|
|
202
202
|
"lint-staged": "^15.2.10",
|
|
203
203
|
"prettier-plugin-astro": "^0.14.1",
|
|
204
204
|
"prettier-plugin-slidev": "^1.0.5",
|
|
@@ -210,12 +210,12 @@ var package_default = {
|
|
|
210
210
|
tsx: "^4.19.1",
|
|
211
211
|
typescript: "^5.6.2",
|
|
212
212
|
vitest: "^2.1.1",
|
|
213
|
-
vue: "^3.5.
|
|
213
|
+
vue: "^3.5.8"
|
|
214
214
|
},
|
|
215
215
|
resolutions: {
|
|
216
216
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
217
|
-
"@typescript-eslint/utils": "^8.
|
|
218
|
-
eslint: "^9.
|
|
217
|
+
"@typescript-eslint/utils": "^8.7.0",
|
|
218
|
+
eslint: "^9.11.1",
|
|
219
219
|
tsx: "^4.19.1"
|
|
220
220
|
},
|
|
221
221
|
"simple-git-hooks": {
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import c from "picocolors";
|
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@antfu/eslint-config",
|
|
14
14
|
type: "module",
|
|
15
|
-
version: "3.7.
|
|
15
|
+
version: "3.7.2",
|
|
16
16
|
packageManager: "pnpm@9.11.0",
|
|
17
17
|
description: "Anthony's ESLint config",
|
|
18
18
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -112,20 +112,20 @@ var package_default = {
|
|
|
112
112
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
113
113
|
"@eslint/markdown": "^6.1.0",
|
|
114
114
|
"@stylistic/eslint-plugin": "^2.8.0",
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
116
|
-
"@typescript-eslint/parser": "^8.
|
|
115
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
116
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
117
117
|
"@vitest/eslint-plugin": "^1.1.4",
|
|
118
118
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
119
119
|
"eslint-flat-config-utils": "^0.4.0",
|
|
120
120
|
"eslint-merge-processors": "^0.1.0",
|
|
121
121
|
"eslint-plugin-antfu": "^2.7.0",
|
|
122
122
|
"eslint-plugin-command": "^0.2.5",
|
|
123
|
-
"eslint-plugin-import-x": "^4.
|
|
124
|
-
"eslint-plugin-jsdoc": "^50.2.
|
|
123
|
+
"eslint-plugin-import-x": "^4.3.0",
|
|
124
|
+
"eslint-plugin-jsdoc": "^50.2.5",
|
|
125
125
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
126
126
|
"eslint-plugin-n": "^17.10.3",
|
|
127
127
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
128
|
-
"eslint-plugin-perfectionist": "^3.
|
|
128
|
+
"eslint-plugin-perfectionist": "^3.7.0",
|
|
129
129
|
"eslint-plugin-regexp": "^2.6.0",
|
|
130
130
|
"eslint-plugin-toml": "^0.11.1",
|
|
131
131
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
@@ -151,13 +151,13 @@ var package_default = {
|
|
|
151
151
|
"@prettier/plugin-xml": "^3.4.1",
|
|
152
152
|
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
153
153
|
"@types/fs-extra": "^11.0.4",
|
|
154
|
-
"@types/node": "^22.
|
|
154
|
+
"@types/node": "^22.7.2",
|
|
155
155
|
"@types/prompts": "^2.4.9",
|
|
156
156
|
"@types/yargs": "^17.0.33",
|
|
157
157
|
"@unocss/eslint-plugin": "^0.62.4",
|
|
158
158
|
"astro-eslint-parser": "^1.0.3",
|
|
159
159
|
bumpp: "^9.5.2",
|
|
160
|
-
eslint: "^9.
|
|
160
|
+
eslint: "^9.11.1",
|
|
161
161
|
"eslint-plugin-astro": "^1.2.4",
|
|
162
162
|
"eslint-plugin-format": "^0.1.2",
|
|
163
163
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
@@ -169,7 +169,7 @@ var package_default = {
|
|
|
169
169
|
execa: "^9.4.0",
|
|
170
170
|
"fast-glob": "^3.3.2",
|
|
171
171
|
"fs-extra": "^11.2.0",
|
|
172
|
-
jiti: "^
|
|
172
|
+
jiti: "^2.0.0",
|
|
173
173
|
"lint-staged": "^15.2.10",
|
|
174
174
|
"prettier-plugin-astro": "^0.14.1",
|
|
175
175
|
"prettier-plugin-slidev": "^1.0.5",
|
|
@@ -181,12 +181,12 @@ var package_default = {
|
|
|
181
181
|
tsx: "^4.19.1",
|
|
182
182
|
typescript: "^5.6.2",
|
|
183
183
|
vitest: "^2.1.1",
|
|
184
|
-
vue: "^3.5.
|
|
184
|
+
vue: "^3.5.8"
|
|
185
185
|
},
|
|
186
186
|
resolutions: {
|
|
187
187
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
188
|
-
"@typescript-eslint/utils": "^8.
|
|
189
|
-
eslint: "^9.
|
|
188
|
+
"@typescript-eslint/utils": "^8.7.0",
|
|
189
|
+
eslint: "^9.11.1",
|
|
190
190
|
tsx: "^4.19.1"
|
|
191
191
|
},
|
|
192
192
|
"simple-git-hooks": {
|
package/dist/index.cjs
CHANGED
|
@@ -107,7 +107,7 @@ __export(src_exports, {
|
|
|
107
107
|
});
|
|
108
108
|
module.exports = __toCommonJS(src_exports);
|
|
109
109
|
|
|
110
|
-
// node_modules/.pnpm/tsup@8.3.0_jiti@
|
|
110
|
+
// node_modules/.pnpm/tsup@8.3.0_jiti@2.0.0_postcss@8.4.47_tsx@4.19.1_typescript@5.6.2_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
|
|
111
111
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
112
112
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
113
113
|
|
|
@@ -507,6 +507,16 @@ async function stylistic(options = {}) {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
// src/configs/formatters.ts
|
|
510
|
+
function mergePrettierOptions(options, overrides = {}) {
|
|
511
|
+
return {
|
|
512
|
+
...options,
|
|
513
|
+
...overrides,
|
|
514
|
+
plugins: [
|
|
515
|
+
...overrides.plugins || [],
|
|
516
|
+
...options.plugins || []
|
|
517
|
+
]
|
|
518
|
+
};
|
|
519
|
+
}
|
|
510
520
|
async function formatters(options = {}, stylistic2 = {}) {
|
|
511
521
|
if (options === true) {
|
|
512
522
|
const isPrettierPluginXmlInScope = isPackageInScope("@prettier/plugin-xml");
|
|
@@ -583,10 +593,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
583
593
|
rules: {
|
|
584
594
|
"format/prettier": [
|
|
585
595
|
"error",
|
|
586
|
-
{
|
|
587
|
-
...prettierOptions,
|
|
596
|
+
mergePrettierOptions(prettierOptions, {
|
|
588
597
|
parser: "css"
|
|
589
|
-
}
|
|
598
|
+
})
|
|
590
599
|
]
|
|
591
600
|
}
|
|
592
601
|
},
|
|
@@ -599,10 +608,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
599
608
|
rules: {
|
|
600
609
|
"format/prettier": [
|
|
601
610
|
"error",
|
|
602
|
-
{
|
|
603
|
-
...prettierOptions,
|
|
611
|
+
mergePrettierOptions(prettierOptions, {
|
|
604
612
|
parser: "scss"
|
|
605
|
-
}
|
|
613
|
+
})
|
|
606
614
|
]
|
|
607
615
|
}
|
|
608
616
|
},
|
|
@@ -615,10 +623,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
615
623
|
rules: {
|
|
616
624
|
"format/prettier": [
|
|
617
625
|
"error",
|
|
618
|
-
{
|
|
619
|
-
...prettierOptions,
|
|
626
|
+
mergePrettierOptions(prettierOptions, {
|
|
620
627
|
parser: "less"
|
|
621
|
-
}
|
|
628
|
+
})
|
|
622
629
|
]
|
|
623
630
|
}
|
|
624
631
|
}
|
|
@@ -634,10 +641,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
634
641
|
rules: {
|
|
635
642
|
"format/prettier": [
|
|
636
643
|
"error",
|
|
637
|
-
{
|
|
638
|
-
...prettierOptions,
|
|
644
|
+
mergePrettierOptions(prettierOptions, {
|
|
639
645
|
parser: "html"
|
|
640
|
-
}
|
|
646
|
+
})
|
|
641
647
|
]
|
|
642
648
|
}
|
|
643
649
|
});
|
|
@@ -652,14 +658,12 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
652
658
|
rules: {
|
|
653
659
|
"format/prettier": [
|
|
654
660
|
"error",
|
|
655
|
-
{
|
|
656
|
-
...prettierXmlOptions,
|
|
657
|
-
...prettierOptions,
|
|
661
|
+
mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
|
|
658
662
|
parser: "xml",
|
|
659
663
|
plugins: [
|
|
660
664
|
"@prettier/plugin-xml"
|
|
661
665
|
]
|
|
662
|
-
}
|
|
666
|
+
})
|
|
663
667
|
]
|
|
664
668
|
}
|
|
665
669
|
});
|
|
@@ -674,14 +678,12 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
674
678
|
rules: {
|
|
675
679
|
"format/prettier": [
|
|
676
680
|
"error",
|
|
677
|
-
{
|
|
678
|
-
...prettierXmlOptions,
|
|
679
|
-
...prettierOptions,
|
|
681
|
+
mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
|
|
680
682
|
parser: "xml",
|
|
681
683
|
plugins: [
|
|
682
684
|
"@prettier/plugin-xml"
|
|
683
685
|
]
|
|
684
|
-
}
|
|
686
|
+
})
|
|
685
687
|
]
|
|
686
688
|
}
|
|
687
689
|
});
|
|
@@ -699,11 +701,10 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
699
701
|
rules: {
|
|
700
702
|
[`format/${formater}`]: [
|
|
701
703
|
"error",
|
|
702
|
-
formater === "prettier" ? {
|
|
703
|
-
...prettierOptions,
|
|
704
|
+
formater === "prettier" ? mergePrettierOptions(prettierOptions, {
|
|
704
705
|
embeddedLanguageFormatting: "off",
|
|
705
706
|
parser: "markdown"
|
|
706
|
-
} : {
|
|
707
|
+
}) : {
|
|
707
708
|
...dprintOptions,
|
|
708
709
|
language: "markdown"
|
|
709
710
|
}
|
|
@@ -720,14 +721,13 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
720
721
|
rules: {
|
|
721
722
|
"format/prettier": [
|
|
722
723
|
"error",
|
|
723
|
-
{
|
|
724
|
-
...prettierOptions,
|
|
724
|
+
mergePrettierOptions(prettierOptions, {
|
|
725
725
|
embeddedLanguageFormatting: "off",
|
|
726
726
|
parser: "slidev",
|
|
727
727
|
plugins: [
|
|
728
728
|
"prettier-plugin-slidev"
|
|
729
729
|
]
|
|
730
|
-
}
|
|
730
|
+
})
|
|
731
731
|
]
|
|
732
732
|
}
|
|
733
733
|
});
|
|
@@ -743,13 +743,12 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
743
743
|
rules: {
|
|
744
744
|
"format/prettier": [
|
|
745
745
|
"error",
|
|
746
|
-
{
|
|
747
|
-
...prettierOptions,
|
|
746
|
+
mergePrettierOptions(prettierOptions, {
|
|
748
747
|
parser: "astro",
|
|
749
748
|
plugins: [
|
|
750
749
|
"prettier-plugin-astro"
|
|
751
750
|
]
|
|
752
|
-
}
|
|
751
|
+
})
|
|
753
752
|
]
|
|
754
753
|
}
|
|
755
754
|
});
|
|
@@ -777,10 +776,9 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
777
776
|
rules: {
|
|
778
777
|
"format/prettier": [
|
|
779
778
|
"error",
|
|
780
|
-
{
|
|
781
|
-
...prettierOptions,
|
|
779
|
+
mergePrettierOptions(prettierOptions, {
|
|
782
780
|
parser: "graphql"
|
|
783
|
-
}
|
|
781
|
+
})
|
|
784
782
|
]
|
|
785
783
|
}
|
|
786
784
|
});
|
|
@@ -1214,6 +1212,7 @@ async function markdown(options = {}) {
|
|
|
1214
1212
|
},
|
|
1215
1213
|
name: "antfu/markdown/disables",
|
|
1216
1214
|
rules: {
|
|
1215
|
+
"antfu/no-top-level-await": "off",
|
|
1217
1216
|
"import/newline-after-import": "off",
|
|
1218
1217
|
"no-alert": "off",
|
|
1219
1218
|
"no-console": "off",
|