@@ -3,71 +3,71 @@ const tseslint = require('@typescript-eslint/eslint-plugin');
3
3
const tsparser = require ( '@typescript-eslint/parser' ) ;
4
4
5
5
module . exports = [
6
- js . configs . recommended ,
7
- {
8
- files : [ '**/*.ts' , '**/*.tsx' ] ,
9
- languageOptions : {
10
- parser : tsparser ,
11
- parserOptions : {
12
- ecmaVersion : 'latest' ,
13
- sourceType : 'module' ,
14
- project : './tsconfig.json' ,
15
- } ,
16
- globals : {
17
- console : 'readonly' ,
18
- process : 'readonly' ,
19
- Buffer : 'readonly' ,
20
- __dirname : 'readonly' ,
21
- __filename : 'readonly' ,
22
- global : 'readonly' ,
23
- module : 'readonly' ,
24
- require : 'readonly' ,
25
- exports : 'readonly' ,
26
- } ,
27
- } ,
28
- plugins : {
29
- '@typescript-eslint' : tseslint ,
30
- } ,
31
- rules : {
32
- ...tseslint . configs . recommended . rules ,
33
- '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
34
- '@typescript-eslint/explicit-function-return-type' : 'off' ,
35
- '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
36
- '@typescript-eslint/no-explicit-any' : 'warn' ,
37
- '@typescript-eslint/no-non-null-assertion' : 'warn' ,
38
- 'prefer-const' : 'error' ,
39
- 'no-var' : 'error' ,
40
- 'no-console' : 'warn' ,
41
- } ,
42
- } ,
43
- {
44
- files : [ '**/*.spec.ts' , '**/*.test.ts' ] ,
45
- languageOptions : {
46
- globals : {
47
- describe : 'readonly' ,
48
- it : 'readonly' ,
49
- test : 'readonly' ,
50
- expect : 'readonly' ,
51
- beforeEach : 'readonly' ,
52
- afterEach : 'readonly' ,
53
- beforeAll : 'readonly' ,
54
- afterAll : 'readonly' ,
55
- jest : 'readonly' ,
56
- } ,
57
- } ,
58
- rules : {
59
- '@typescript-eslint/no-explicit-any' : 'off' ,
60
- 'no-console' : 'off' ,
61
- } ,
62
- } ,
63
- {
64
- ignores : [
65
- 'dist/' ,
66
- 'node_modules/' ,
67
- '*.js' ,
68
- ' *.d.ts',
69
- '*.config.js' ,
70
- '*.config.mjs' ,
71
- ] ,
72
- } ,
73
- ] ;
6
+ js . configs . recommended ,
7
+ {
8
+ files : [ '**/*.ts' , '**/*.tsx' ] ,
9
+ languageOptions : {
10
+ parser : tsparser ,
11
+ parserOptions : {
12
+ ecmaVersion : 'latest' ,
13
+ sourceType : 'module' ,
14
+ project : './tsconfig.json' ,
15
+ } ,
16
+ globals : {
17
+ console : 'readonly' ,
18
+ process : 'readonly' ,
19
+ Buffer : 'readonly' ,
20
+ __dirname : 'readonly' ,
21
+ __filename : 'readonly' ,
22
+ global : 'readonly' ,
23
+ module : 'readonly' ,
24
+ require : 'readonly' ,
25
+ exports : 'readonly' ,
26
+ } ,
27
+ } ,
28
+ plugins : {
29
+ '@typescript-eslint' : tseslint ,
30
+ } ,
31
+ rules : {
32
+ ...tseslint . configs . recommended . rules ,
33
+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
34
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
35
+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
36
+ '@typescript-eslint/no-explicit-any' : 'warn' ,
37
+ '@typescript-eslint/no-non-null-assertion' : 'warn' ,
38
+ 'prefer-const' : 'error' ,
39
+ 'no-var' : 'error' ,
40
+ 'no-console' : 'warn' ,
41
+ } ,
42
+ } ,
43
+ {
44
+ files : [ '**/*.spec.ts' , '**/*.test.ts' ] ,
45
+ languageOptions : {
46
+ globals : {
47
+ describe : 'readonly' ,
48
+ it : 'readonly' ,
49
+ test : 'readonly' ,
50
+ expect : 'readonly' ,
51
+ beforeEach : 'readonly' ,
52
+ afterEach : 'readonly' ,
53
+ beforeAll : 'readonly' ,
54
+ afterAll : 'readonly' ,
55
+ jest : 'readonly' ,
56
+ } ,
57
+ } ,
58
+ rules : {
59
+ '@typescript-eslint/no-explicit-any' : 'off' ,
60
+ 'no-console' : 'off' ,
61
+ } ,
62
+ } ,
63
+ {
64
+ ignores : [
65
+ 'dist/' ,
66
+ 'node_modules/' ,
67
+ '*.js' ,
68
+ '**/ *.d.ts',
69
+ '*.config.js' ,
70
+ '*.config.mjs' ,
71
+ ] ,
72
+ } ,
73
+ ] ;
0 commit comments