1- import { FlatCompat } from '@eslint/eslintrc' ;
21import js from '@eslint/js' ;
32import typescriptEslint from '@typescript-eslint/eslint-plugin' ;
4- import tsParser from '@typescript-eslint/parser' ;
53import { defineConfig , globalIgnores } from 'eslint/config' ;
4+ import prettierRecommended from 'eslint-plugin-prettier/recommended' ;
65import globals from 'globals' ;
7- import path from 'node:path' ;
8- import { fileURLToPath } from 'node:url' ;
9-
10- const __filename = fileURLToPath ( import . meta. url ) ;
11- const __dirname = path . dirname ( __filename ) ;
12- const compat = new FlatCompat ( {
13- baseDirectory : __dirname ,
14- recommendedConfig : js . configs . recommended ,
15- allConfig : js . configs . all ,
16- } ) ;
176
187export default defineConfig ( [
198 globalIgnores ( [
@@ -23,27 +12,16 @@ export default defineConfig([
2312 'src/types/' ,
2413 '!**/.eslintrc.js' ,
2514 ] ) ,
15+ js . configs . recommended ,
16+ ...typescriptEslint . configs [ 'flat/recommended' ] ,
17+ ...typescriptEslint . configs [ 'flat/recommended-type-checked' ] ,
18+ prettierRecommended ,
2619 {
27- extends : compat . extends (
28- 'eslint:recommended' ,
29- 'plugin:@typescript-eslint/recommended' ,
30- 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
31- 'plugin:prettier/recommended' ,
32- ) ,
33-
34- plugins : {
35- '@typescript-eslint' : typescriptEslint ,
36- } ,
37-
3820 languageOptions : {
3921 globals : {
4022 ...globals . node ,
4123 } ,
4224
43- parser : tsParser ,
44- ecmaVersion : 'latest' ,
45- sourceType : 'module' ,
46-
4725 parserOptions : {
4826 project : './tsconfig.json' ,
4927 } ,
0 commit comments