File tree Expand file tree Collapse file tree
test/__snapshots__/factory Expand file tree Collapse file tree Original file line number Diff line number Diff line change 157157 "eslint-plugin-yml" : " catalog:prod" ,
158158 "eslint-processor-vue-blocks" : " catalog:prod" ,
159159 "globals" : " catalog:prod" ,
160- "jsonc-eslint-parser" : " catalog:prod" ,
161160 "local-pkg" : " catalog:prod" ,
162161 "parse-gitignore" : " catalog:prod" ,
163162 "toml-eslint-parser" : " catalog:prod" ,
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ catalogs:
9393 eslint-plugin-yml : ^3.3.0
9494 eslint-processor-vue-blocks : ^2.0.0
9595 globals : ^17.3.0
96- jsonc-eslint-parser : ^3.1.0
9796 local-pkg : ^1.1.2
9897 parse-gitignore : ^2.0.0
9998 toml-eslint-parser : ^1.0.3
Original file line number Diff line number Diff line change @@ -16,13 +16,7 @@ export async function jsonc(
1616 indent = 2 ,
1717 } = typeof stylistic === 'boolean' ? { } : stylistic
1818
19- const [
20- pluginJsonc ,
21- parserJsonc ,
22- ] = await Promise . all ( [
23- interopDefault ( import ( 'eslint-plugin-jsonc' ) ) ,
24- interopDefault ( import ( 'jsonc-eslint-parser' ) ) ,
25- ] as const )
19+ const pluginJsonc = await interopDefault ( import ( 'eslint-plugin-jsonc' ) )
2620
2721 return [
2822 {
@@ -33,9 +27,7 @@ export async function jsonc(
3327 } ,
3428 {
3529 files,
36- languageOptions : {
37- parser : parserJsonc ,
38- } ,
30+ language : 'jsonc/x' ,
3931 name : 'antfu/jsonc/rules' ,
4032 rules : {
4133 'jsonc/no-bigint-literals' : 'error' ,
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ export async function pnpm(
2020 pluginPnpm ,
2121 pluginYaml ,
2222 yamlParser ,
23- jsoncParser ,
2423 ] = await Promise . all ( [
2524 interopDefault ( import ( 'eslint-plugin-pnpm' ) ) ,
2625 interopDefault ( import ( 'eslint-plugin-yml' ) ) ,
2726 interopDefault ( import ( 'yaml-eslint-parser' ) ) ,
28- interopDefault ( import ( 'jsonc-eslint-parser' ) ) ,
2927 ] )
3028
3129 const {
@@ -45,9 +43,7 @@ export async function pnpm(
4543 'package.json' ,
4644 '**/package.json' ,
4745 ] ,
48- languageOptions : {
49- parser : jsoncParser ,
50- } ,
46+ language : 'jsonc/x' ,
5147 name : 'antfu/pnpm/package-json' ,
5248 plugins : {
5349 pnpm : pluginPnpm ,
Original file line number Diff line number Diff line change 740740 "**/*.json5" ,
741741 "**/*.jsonc" ,
742742 ] ,
743- "languageOptions" : {
744- "parser" : "jsonc-eslint-parser" ,
745- } ,
743+ "language" : "jsonc/x" ,
746744 "name" : "antfu/jsonc/rules" ,
747745 "rules" : [
748746 "jsonc/no-bigint-literals" ,
808806 "package.json" ,
809807 "**/package.json" ,
810808 ] ,
811- "languageOptions" : {
812- "parser" : "jsonc-eslint-parser" ,
813- } ,
809+ "language" : "jsonc/x" ,
814810 "name" : "antfu/pnpm/package-json" ,
815811 "plugins" : [
816812 "pnpm" ,
Original file line number Diff line number Diff line change 12511251 "**/*.json5" ,
12521252 "**/*.jsonc" ,
12531253 ] ,
1254- "languageOptions" : {
1255- "parser" : "jsonc-eslint-parser" ,
1256- } ,
1254+ "language" : "jsonc/x" ,
12571255 "name" : "antfu/jsonc/rules" ,
12581256 "rules" : [
12591257 "jsonc/no-bigint-literals" ,
13191317 "package.json" ,
13201318 "**/package.json" ,
13211319 ] ,
1322- "languageOptions" : {
1323- "parser" : "jsonc-eslint-parser" ,
1324- } ,
1320+ "language" : "jsonc/x" ,
13251321 "name" : "antfu/pnpm/package-json" ,
13261322 "plugins" : [
13271323 "pnpm" ,
Original file line number Diff line number Diff line change 740740 "**/*.json5" ,
741741 "**/*.jsonc" ,
742742 ] ,
743- "languageOptions" : {
744- "parser" : "jsonc-eslint-parser" ,
745- } ,
743+ "language" : "jsonc/x" ,
746744 "name" : "antfu/jsonc/rules" ,
747745 "rules" : [
748746 "jsonc/no-bigint-literals" ,
808806 "package.json" ,
809807 "**/package.json" ,
810808 ] ,
811- "languageOptions" : {
812- "parser" : "jsonc-eslint-parser" ,
813- } ,
809+ "language" : "jsonc/x" ,
814810 "name" : "antfu/pnpm/package-json" ,
815811 "plugins" : [
816812 "pnpm" ,
Original file line number Diff line number Diff line change 643643 "**/*.json5" ,
644644 "**/*.jsonc" ,
645645 ] ,
646- "languageOptions" : {
647- "parser" : "jsonc-eslint-parser" ,
648- } ,
646+ "language" : "jsonc/x" ,
649647 "name" : "antfu/jsonc/rules" ,
650648 "rules" : [
651649 "jsonc/no-bigint-literals" ,
711709 "package.json" ,
712710 "**/package.json" ,
713711 ] ,
714- "languageOptions" : {
715- "parser" : "jsonc-eslint-parser" ,
716- } ,
712+ "language" : "jsonc/x" ,
717713 "name" : "antfu/pnpm/package-json" ,
718714 "plugins" : [
719715 "pnpm" ,
Original file line number Diff line number Diff line change 738738 "**/*.json5" ,
739739 "**/*.jsonc" ,
740740 ] ,
741- "languageOptions" : {
742- "parser" : "jsonc-eslint-parser" ,
743- } ,
741+ "language" : "jsonc/x" ,
744742 "name" : "antfu/jsonc/rules" ,
745743 "rules" : [
746744 "jsonc/no-bigint-literals" ,
806804 "package.json" ,
807805 "**/package.json" ,
808806 ] ,
809- "languageOptions" : {
810- "parser" : "jsonc-eslint-parser" ,
811- } ,
807+ "language" : "jsonc/x" ,
812808 "name" : "antfu/pnpm/package-json" ,
813809 "plugins" : [
814810 "pnpm" ,
You can’t perform that action at this time.
0 commit comments