11import { resolve } from "node:path" ;
22import { cwd } from "node:process" ;
3- import globals from ' globals'
3+ import globals from " globals" ;
44import { defineConfig } from "eslint/config" ;
5- import eslint from ' @eslint/js'
6- import tseslint from ' typescript-eslint'
5+ import eslint from " @eslint/js" ;
6+ import tseslint from " typescript-eslint" ;
77import tsParser from "@typescript-eslint/parser" ;
8- import reactRefreshPlugin from ' eslint-plugin-react-refresh'
9- import reactHooksPlugin from ' eslint-plugin-react-hooks'
8+ import reactRefreshPlugin from " eslint-plugin-react-refresh" ;
9+ import reactHooksPlugin from " eslint-plugin-react-hooks" ;
1010
1111const PACKAGE_ROOT = resolve ( cwd ( ) ) ;
1212
1313export default defineConfig (
14- eslint . configs . recommended ,
15- ...tseslint . configs . recommended ,
14+ eslint . configs . recommended ,
15+ ...tseslint . configs . recommended ,
1616 reactHooksPlugin . configs . flat . recommended ,
1717 {
1818 languageOptions : {
1919 parserOptions : {
2020 tsconfigRootDir : PACKAGE_ROOT ,
2121 projectService : true ,
22- } ,
23- } ,
22+ }
23+ }
2424 } ,
2525 {
26- files : [ ' **/*.{ts,tsx}' ] ,
26+ files : [ " **/*.{ts,tsx}" ] ,
2727 languageOptions : {
2828 parser : tsParser ,
2929 parserOptions : {
30- project : [ "tsconfig.json" ] ,
3130 tsconfigRootDir : cwd ( ) ,
3231 projectService : true ,
3332
@@ -37,22 +36,22 @@ export default defineConfig(
3736 }
3837 } ,
3938 plugins : {
40- ' react-hooks' : reactHooksPlugin ,
41- ' react-refresh' : reactRefreshPlugin ,
39+ " react-hooks" : reactHooksPlugin ,
40+ " react-refresh" : reactRefreshPlugin
4241 } ,
4342 rules : {
4443 ...reactHooksPlugin . configs . recommended . rules ,
45- ' react-refresh/only-export-components' : [
46- ' warn' ,
47- { allowConstantExport : true } ,
48- ] ,
49- } ,
44+ " react-refresh/only-export-components" : [
45+ " warn" ,
46+ { allowConstantExport : true }
47+ ]
48+ }
5049 } ,
5150 {
5251 files : [ "*.js" , "*.cjs" , "*.mjs" ] ,
53- extends : [ tseslint . configs . disableTypeChecked ] ,
52+ extends : [ tseslint . configs . disableTypeChecked ]
5453 } ,
5554 {
56- ignores : [ "dist/**" ] ,
57- } ,
58- )
55+ ignores : [ "dist/**" ]
56+ }
57+ ) ;
0 commit comments