@@ -10,30 +10,16 @@ import tseslint from 'typescript-eslint'
10
10
11
11
export default tseslint . config (
12
12
{
13
- name : 'exuanbo/languages-node' ,
14
- files : [ '**/*.?(c|m)js' , '*.?(c|m)ts' ] ,
13
+ name : 'exuanbo/languages' ,
15
14
languageOptions : {
16
- // https://vitejs.dev/blog/announcing-vite5.html#node-js-support
17
- // https://node.green/#ES2022
18
15
ecmaVersion : 2022 ,
19
16
globals : {
17
+ ...globals . browser ,
20
18
...globals . es2022 ,
21
19
...globals . node ,
22
20
} ,
23
21
} ,
24
22
} ,
25
- {
26
- name : 'exuanbo/languages-browser' ,
27
- files : [ 'src/**/*.?(c|m){j,t}s?(x)' ] ,
28
- languageOptions : {
29
- // https://vitejs.dev/guide/build.html#browser-compatibility
30
- ecmaVersion : 2021 ,
31
- globals : {
32
- ...globals . browser ,
33
- ...globals . es2021 ,
34
- } ,
35
- } ,
36
- } ,
37
23
{
38
24
name : 'exuanbo/ignores' ,
39
25
ignores : [ '.yarn' , 'coverage' , 'dist' ] ,
@@ -61,19 +47,21 @@ export default tseslint.config(
61
47
'@typescript-eslint/consistent-type-imports' : [ 'error' , {
62
48
fixStyle : 'inline-type-imports' ,
63
49
} ] ,
50
+ '@typescript-eslint/no-import-type-side-effects' : 'error' ,
51
+ '@typescript-eslint/no-namespace' : [ 'error' , {
52
+ allowDeclarations : true ,
53
+ } ] ,
54
+ '@typescript-eslint/no-unused-expressions' : [ 'error' , {
55
+ allowShortCircuit : true ,
56
+ } ] ,
64
57
'@typescript-eslint/no-empty-object-type' : 'off' ,
65
58
'@typescript-eslint/no-explicit-any' : 'off' ,
66
- '@typescript-eslint/no-import-type-side-effects' : 'error' ,
67
- '@typescript-eslint/no-namespace' : 'off' ,
68
59
'@typescript-eslint/no-unsafe-argument' : 'off' ,
69
60
'@typescript-eslint/no-unsafe-assignment' : 'off' ,
70
61
'@typescript-eslint/no-unsafe-call' : 'off' ,
71
62
'@typescript-eslint/no-unsafe-enum-comparison' : 'off' ,
72
63
'@typescript-eslint/no-unsafe-function-type' : 'off' ,
73
64
'@typescript-eslint/no-unsafe-return' : 'off' ,
74
- '@typescript-eslint/no-unused-expressions' : [ 'error' , {
75
- allowShortCircuit : true ,
76
- } ] ,
77
65
} ,
78
66
} ,
79
67
{
0 commit comments