1- import { defineConfig } from " eslint/config" ;
2- import globals from " globals" ;
3- import js from " @eslint/js" ;
4- import tseslint from " typescript-eslint" ;
5- import astro from " eslint-plugin-astro" ;
6- import prettier from " eslint-plugin-prettier" ;
7- import * as mdx from " eslint-plugin-mdx" ;
1+ import { defineConfig } from ' eslint/config'
2+ import globals from ' globals'
3+ import js from ' @eslint/js'
4+ import tseslint from ' typescript-eslint'
5+ import astro from ' eslint-plugin-astro'
6+ import prettier from ' eslint-plugin-prettier'
7+ import * as mdx from ' eslint-plugin-mdx'
88// import markdown from "@eslint/markdown";
9- import unocss from "@unocss/eslint-config/flat" ;
109
1110// parsers
12- const tsParser = tseslint . parser ;
13- const astroParser = astro . parser ;
11+ const tsParser = tseslint . parser
12+ const astroParser = astro . parser
1413
1514export default defineConfig ( [
1615 // Global configuration
1716 {
1817 languageOptions : {
1918 globals : {
2019 ...globals . browser ,
21- ...globals . node ,
22- } ,
23- } ,
20+ ...globals . node
21+ }
22+ }
2423 } ,
2524
2625 // Base configs
@@ -30,33 +29,33 @@ export default defineConfig([
3029 // Prettier config
3130 {
3231 plugins : {
33- prettier : prettier ,
32+ prettier : prettier
3433 } ,
3534 rules : {
3635 // disable warnings, since prettier should format on save
37- " prettier/prettier" : " off" ,
38- } ,
36+ ' prettier/prettier' : ' off'
37+ }
3938 } ,
4039
4140 // astro setup with a11y
4241 astro . configs . recommended ,
43- astro . configs [ " jsx-a11y-recommended" ] ,
42+ astro . configs [ ' jsx-a11y-recommended' ] ,
4443 {
45- files : [ " **/*.astro" ] ,
44+ files : [ ' **/*.astro' ] ,
4645 languageOptions : {
4746 parser : astroParser ,
4847 parserOptions : {
4948 parser : tsParser ,
50- extraFileExtensions : [ " .astro" ] ,
51- sourceType : " module" ,
52- ecmaVersion : " latest" ,
53- project : " ./tsconfig.json" ,
54- } ,
49+ extraFileExtensions : [ ' .astro' ] ,
50+ sourceType : ' module' ,
51+ ecmaVersion : ' latest' ,
52+ project : ' ./tsconfig.json'
53+ }
5554 } ,
5655 rules : {
57- " no-undef" : " off" , // Disable "not defined" errors for specific Astro types that are globally available (ImageMetadata)
58- " @typescript-eslint/no-explicit-any" : " off" , // you may want this as it can get annoying
59- } ,
56+ ' no-undef' : ' off' , // Disable "not defined" errors for specific Astro types that are globally available (ImageMetadata)
57+ ' @typescript-eslint/no-explicit-any' : ' off' // you may want this as it can get annoying
58+ }
6059 } ,
6160 // {
6261 // files: ["**/*.md"],
@@ -73,9 +72,8 @@ export default defineConfig([
7372 // },
7473 // },
7574 { ...mdx . flat } ,
76- unocss ,
7775 // Ignore patterns
7876 {
79- ignores : [ " dist/**" , " **/*.d.ts" , " .github/" ] ,
80- } ,
81- ] ) ;
77+ ignores : [ ' dist/**' , ' **/*.d.ts' , ' .github/' ]
78+ }
79+ ] )
0 commit comments