1+ import { defineConfig } from "eslint/config" ;
2+ import jest from "eslint-plugin-jest" ;
3+ import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
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 (
21+ "plugin:prettier/recommended" ,
22+ "plugin:@typescript-eslint/eslint-recommended" ,
23+ "plugin:@typescript-eslint/recommended" ,
24+ ) ,
25+
26+ plugins : {
27+ jest,
28+ "@typescript-eslint" : typescriptEslint ,
29+ } ,
30+
31+ languageOptions : {
32+ globals : {
33+ ...globals . node ,
34+ ...jest . environments . globals . globals ,
35+ } ,
36+
37+ parser : tsParser ,
38+ ecmaVersion : 2020 ,
39+ sourceType : "module" ,
40+ } ,
41+
42+ rules : {
43+ "no-console" : "error" ,
44+ "no-plusplus" : "off" ,
45+ "no-await-in-loop" : "off" ,
46+ "no-constant-condition" : "off" ,
47+ "no-restricted-syntax" : "off" ,
48+ "@typescript-eslint/ban-ts-comment" : "off" ,
49+ "@typescript-eslint/no-explicit-any" : "off" ,
50+ } ,
51+ } ] ) ;
0 commit comments