1- import { defineConfig , globalIgnores } from "eslint/config" ;
2- import _import from "eslint-plugin-import" ;
3- import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin" ;
4- import unusedImports from "eslint-plugin-unused-imports" ;
5- import { fixupPluginRules } from "@eslint/compat" ;
6- import tsParser from "@typescript-eslint/parser" ;
7- import path from "node:path" ;
8- import { fileURLToPath } from "node:url" ;
9- import js from "@eslint/js" ;
10- import { FlatCompat } from "@eslint/eslintrc" ;
1+ import path from 'node:path' ;
2+ import { fileURLToPath } from 'node:url' ;
3+
4+ import { fixupPluginRules } from '@eslint/compat' ;
5+ import { FlatCompat } from '@eslint/eslintrc' ;
6+ import js from '@eslint/js' ;
7+ import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin' ;
8+ import tsParser from '@typescript-eslint/parser' ;
9+ import _import from 'eslint-plugin-import' ;
10+ import unusedImports from 'eslint-plugin-unused-imports' ;
11+ import { defineConfig , globalIgnores } from 'eslint/config' ;
1112
1213const __filename = fileURLToPath ( import . meta. url ) ;
1314const __dirname = path . dirname ( __filename ) ;
1415const compat = new FlatCompat ( {
15- baseDirectory : __dirname ,
16- recommendedConfig : js . configs . recommended ,
17- allConfig : js . configs . all
16+ baseDirectory : __dirname ,
17+ recommendedConfig : js . configs . recommended ,
18+ allConfig : js . configs . all ,
1819} ) ;
1920
20- export default defineConfig ( [ globalIgnores ( [ "**/.prettierrc.js" , "bin/**/*.js" ] ) , {
21- extends : compat . extends ( "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ) ,
21+ export default defineConfig ( [
22+ globalIgnores ( [ '**/.prettierrc.js' , 'bin/**/*.js' ] ) ,
23+ {
24+ extends : compat . extends ( 'plugin:@typescript-eslint/recommended' , 'plugin:prettier/recommended' ) ,
2225
2326 plugins : {
24- import : fixupPluginRules ( _import ) ,
25- " @typescript-eslint" : typescriptEslintEslintPlugin ,
26- " unused-imports" : unusedImports ,
27+ ' import' : fixupPluginRules ( _import ) ,
28+ ' @typescript-eslint' : typescriptEslintEslintPlugin ,
29+ ' unused-imports' : unusedImports ,
2730 } ,
2831
2932 languageOptions : {
30- parser : tsParser ,
33+ parser : tsParser ,
3134 } ,
3235
3336 rules : {
34- " @typescript-eslint/interface-name-prefix" : " off" ,
35- " @typescript-eslint/explicit-function-return-type" : " off" ,
36- " @typescript-eslint/explicit-module-boundary-types" : " off" ,
37- " @typescript-eslint/no-explicit-any" : " off" ,
38- " @typescript-eslint/ban-ts-comment" : " off" ,
39- " react-hooks/exhaustive-deps" : " off" ,
40- " unused-imports/no-unused-imports" : 1 ,
37+ ' @typescript-eslint/interface-name-prefix' : ' off' ,
38+ ' @typescript-eslint/explicit-function-return-type' : ' off' ,
39+ ' @typescript-eslint/explicit-module-boundary-types' : ' off' ,
40+ ' @typescript-eslint/no-explicit-any' : ' off' ,
41+ ' @typescript-eslint/ban-ts-comment' : ' off' ,
42+ ' react-hooks/exhaustive-deps' : ' off' ,
43+ ' unused-imports/no-unused-imports' : 1 ,
4144
42- "import/order" : [ "error" , {
43- groups : [ "builtin" , "external" , "internal" , "parent" , "sibling" ] ,
45+ 'import/order' : [
46+ 'error' ,
47+ {
48+ 'groups' : [ 'builtin' , 'external' , 'internal' , 'parent' , 'sibling' ] ,
4449
45- pathGroups : [ {
46- pattern : "src/**" ,
47- group : "internal" ,
48- position : "before" ,
49- } ] ,
50+ 'pathGroups' : [
51+ {
52+ pattern : 'src/**' ,
53+ group : 'internal' ,
54+ position : 'before' ,
55+ } ,
56+ ] ,
5057
51- pathGroupsExcludedImportTypes : [ " builtin" ] ,
58+ ' pathGroupsExcludedImportTypes' : [ ' builtin' ] ,
5259
53- alphabetize : {
54- order : " asc" ,
55- caseInsensitive : false ,
56- } ,
60+ ' alphabetize' : {
61+ order : ' asc' ,
62+ caseInsensitive : false ,
63+ } ,
5764
58- "newlines-between" : "always-and-inside-groups" ,
59- warnOnUnassignedImports : true ,
60- } ] ,
65+ 'newlines-between' : 'always-and-inside-groups' ,
66+ 'warnOnUnassignedImports' : true ,
67+ } ,
68+ ] ,
6169
62- "import/no-extraneous-dependencies" : [ "error" , {
63- devDependencies : [
64- "**/*.test.{ts,js}" ,
65- "**/*.spec.{ts,js}" ,
66- "scripts/**/*.{ts,js}" ,
67- "bin/**/*.{ts,js}" ,
68- "test/**/*.{ts,js}" ,
69- ] ,
70- } ] ,
70+ 'import/no-extraneous-dependencies' : [
71+ 'error' ,
72+ {
73+ devDependencies : [
74+ '**/*.test.{ts,js}' ,
75+ '**/*.spec.{ts,js}' ,
76+ 'scripts/**/*.{ts,js}' ,
77+ 'bin/**/*.{ts,js}' ,
78+ 'test/**/*.{ts,js}' ,
79+ ] ,
80+ } ,
81+ ] ,
7182 } ,
72- } , {
73- files : [
74- "**/setupTests.ts" ,
75- "**/*.test.tsx" ,
76- "**/*.test.ts" ,
77- "**/*.@(story|stories).*" ,
78- ] ,
83+ } ,
84+ {
85+ files : [ '**/setupTests.ts' , '**/*.test.tsx' , '**/*.test.ts' , '**/*.@(story|stories).*' ] ,
7986
8087 rules : {
81- " import/no-extraneous-dependencies" : " off" ,
88+ ' import/no-extraneous-dependencies' : ' off' ,
8289 } ,
83- } ] ) ;
90+ } ,
91+ ] ) ;
0 commit comments