1+ import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
2+ import globals from "globals" ;
3+ import tsParser from "@typescript-eslint/parser" ;
4+ import path from "node:path" ;
5+ import { fileURLToPath } from "node:url" ;
6+ import js from "@eslint/js" ;
7+ import { FlatCompat } from "@eslint/eslintrc" ;
8+
9+ const __filename = fileURLToPath ( import . meta. url ) ;
10+ const __dirname = path . dirname ( __filename ) ;
11+ const compat = new FlatCompat ( {
12+ baseDirectory : __dirname ,
13+ recommendedConfig : js . configs . recommended ,
14+ allConfig : js . configs . all
15+ } ) ;
16+
17+ export default [
18+ ...compat . extends ( "eslint:recommended" , "plugin:@typescript-eslint/recommended" ) ,
19+ {
20+ plugins : {
21+ "@typescript-eslint" : typescriptEslint ,
22+ } ,
23+
24+ languageOptions : {
25+ globals : {
26+ ...globals . node ,
27+ } ,
28+
29+ parser : tsParser ,
30+ } ,
31+
32+ rules : {
33+ "max-len" : [ "error" , {
34+ code : 80 ,
35+ } ] ,
36+
37+ "new-parens" : "error" ,
38+ "no-caller" : "error" ,
39+ "no-cond-assign" : [ "error" , "always" ] ,
40+ "no-multiple-empty-lines" : "off" ,
41+
42+ quotes : [ "error" , "single" , {
43+ avoidEscape : true ,
44+ } ] ,
45+
46+ "arrow-parens" : "off" ,
47+ "no-bitwise" : "off" ,
48+ "sort-keys" : "off" ,
49+ "no-console" : "off" ,
50+ "max-classes-per-file" : "off" ,
51+ "no-unused-expressions" : "off" ,
52+ "@typescript-eslint/interface-name-prefix" : "off" ,
53+ "comma-dangle" : [ "error" , "always-multiline" ] ,
54+ "@typescript-eslint/no-namespace" : "off" ,
55+ "@typescript-eslint/no-extraneous-class" : "off" ,
56+ } ,
57+ } ,
58+ ] ;
0 commit comments