1
+ import globals from "globals" ;
2
+ import path from "node:path" ;
3
+ import { fileURLToPath } from "node:url" ;
4
+ import js from "@eslint/js" ;
5
+ import { FlatCompat } from "@eslint/eslintrc" ;
6
+
7
+ const __filename = fileURLToPath ( import . meta. url ) ;
8
+ const __dirname = path . dirname ( __filename ) ;
9
+ const compat = new FlatCompat ( {
10
+ baseDirectory : __dirname ,
11
+ recommendedConfig : js . configs . recommended ,
12
+ allConfig : js . configs . all
13
+ } ) ;
14
+
15
+ export default [ ...compat . extends ( "eslint:recommended" ) , {
16
+ languageOptions : {
17
+ globals : {
18
+ ...globals . browser ,
19
+ } ,
20
+
21
+ ecmaVersion : 6 ,
22
+ sourceType : "module" ,
23
+ } ,
24
+
25
+ rules : {
26
+ "block-scoped-var" : "error" ,
27
+ "consistent-return" : "error" ,
28
+ eqeqeq : "error" ,
29
+ "guard-for-in" : "error" ,
30
+ "no-bitwise" : "error" ,
31
+ "no-caller" : "error" ,
32
+ "no-extra-parens" : "off" ,
33
+ "no-extend-native" : "error" ,
34
+ "no-loop-func" : "error" ,
35
+ "no-new" : "error" ,
36
+ "no-param-reassign" : "error" ,
37
+ "no-return-assign" : "error" ,
38
+ "no-sequences" : "error" ,
39
+ "no-unused-expressions" : "error" ,
40
+ "no-use-before-define" : "error" ,
41
+ "no-undef" : "error" ,
42
+ "no-eq-null" : "error" ,
43
+ radix : [ "error" , "always" ] ,
44
+
45
+ indent : [ "error" , 2 , {
46
+ SwitchCase : 1 ,
47
+ } ] ,
48
+
49
+ quotes : [ "error" , "double" ] ,
50
+ semi : [ "error" , "always" ] ,
51
+ strict : [ "error" , "global" ] ,
52
+ } ,
53
+ } ] ;
0 commit comments