1- // https://github.com/super-linter/super-linter/blob/644fff4cf8f9c402888e29313139dd6e7cbce40e /TEMPLATES/eslint.config.mjs
1+ // https://github.com/super-linter/super-linter/blob/58ee821839c7e0d8979f759a8e5ca0d99bb50737 /TEMPLATES/eslint.config.mjs
22import { defineConfig , globalIgnores } from "eslint/config" ;
33import n from "eslint-plugin-n" ;
44import prettier from "eslint-plugin-prettier" ;
55import globals from "globals" ;
6- import jsoncParser from "jsonc- eslint-parser " ;
6+ import eslintPluginJsonc from "eslint-plugin-jsonc " ;
77import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
88import tsParser from "@typescript-eslint/parser" ;
99import pluginVue from "eslint-plugin-vue" ;
@@ -21,7 +21,7 @@ const compat = new FlatCompat({
2121} ) ;
2222
2323export default defineConfig ( [
24- globalIgnores ( [ "!**/.*" , "**/node_modules/.*" , "**/dist/*" ] ) ,
24+ globalIgnores ( [ "!**/.*" , "**/node_modules/.*" ] ) ,
2525 {
2626 extends : compat . extends ( "eslint:recommended" ) ,
2727
@@ -38,48 +38,18 @@ export default defineConfig([
3838 } ,
3939 } ,
4040 } ,
41- {
41+ ...eslintPluginJsonc . configs [ "recommended-with-json" ] . map ( ( config ) => ( {
42+ ...config ,
4243 files : [ "**/*.json" ] ,
43- extends : compat . extends ( "plugin:jsonc/recommended-with-json" ) ,
44-
45- languageOptions : {
46- parser : jsoncParser ,
47- ecmaVersion : "latest" ,
48- sourceType : "script" ,
49-
50- parserOptions : {
51- jsonSyntax : "JSON" ,
52- } ,
53- } ,
54- } ,
55- {
44+ } ) ) ,
45+ ...eslintPluginJsonc . configs [ "recommended-with-jsonc" ] . map ( ( config ) => ( {
46+ ...config ,
5647 files : [ "**/*.jsonc" ] ,
57- extends : compat . extends ( "plugin:jsonc/recommended-with-jsonc" ) ,
58-
59- languageOptions : {
60- parser : jsoncParser ,
61- ecmaVersion : "latest" ,
62- sourceType : "script" ,
63-
64- parserOptions : {
65- jsonSyntax : "JSONC" ,
66- } ,
67- } ,
68- } ,
69- {
48+ } ) ) ,
49+ ...eslintPluginJsonc . configs [ "recommended-with-json5" ] . map ( ( config ) => ( {
50+ ...config ,
7051 files : [ "**/*.json5" ] ,
71- extends : compat . extends ( "plugin:jsonc/recommended-with-json5" ) ,
72-
73- languageOptions : {
74- parser : jsoncParser ,
75- ecmaVersion : "latest" ,
76- sourceType : "script" ,
77-
78- parserOptions : {
79- jsonSyntax : "JSON5" ,
80- } ,
81- } ,
82- } ,
52+ } ) ) ,
8353 {
8454 files : [ "**/*.js" , "**/*.mjs" , "**/*.cjs" , "**/*.jsx" ] ,
8555 extends : compat . extends ( "plugin:react/recommended" ) ,
0 commit comments