1+ import { defineConfig } from "eslint/config" ;
2+ import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
3+ import prettier from "eslint-plugin-prettier" ;
4+ import globals from "globals" ;
5+ import tsParser from "@typescript-eslint/parser" ;
6+ import path from "node:path" ;
7+ import { fileURLToPath } from "node:url" ;
8+ import js from "@eslint/js" ;
9+ import { FlatCompat } from "@eslint/eslintrc" ;
10+
11+ const __filename = fileURLToPath ( import . meta. url ) ;
12+ const __dirname = path . dirname ( __filename ) ;
13+ const compat = new FlatCompat ( {
14+ baseDirectory : __dirname ,
15+ recommendedConfig : js . configs . recommended ,
16+ allConfig : js . configs . all
17+ } ) ;
18+
19+ export default defineConfig ( [ {
20+ extends : compat . extends ( "eslint:recommended" , "plugin:@typescript-eslint/recommended" ) ,
21+
22+ plugins : {
23+ "@typescript-eslint" : typescriptEslint ,
24+ prettier,
25+ } ,
26+
27+ languageOptions : {
28+ globals : {
29+ ...globals . browser ,
30+ } ,
31+
32+ parser : tsParser ,
33+ ecmaVersion : 12 ,
34+ sourceType : "module" ,
35+ } ,
36+
37+ rules : {
38+ "prettier/prettier" : "warn" ,
39+ "@typescript-eslint/no-explicit-any" : 0 ,
40+ "@typescript-eslint/no-unused-vars" : 0 ,
41+ "@typescript-eslint/no-var-requires" : 0 ,
42+ "@typescript-eslint/ban-types" : 0 ,
43+ "@typescript-eslint/no-namespace" : 0 ,
44+ "@typescript-eslint/explicit-module-boundary-types" : 0 ,
45+ "@typescript-eslint/no-empty-interface" : 0 ,
46+ } ,
47+ } ] ) ;
0 commit comments