1
1
module . exports = {
2
- 'parser' : '@typescript-eslint/parser' ,
3
- 'plugins' : [ '@typescript-eslint' , 'mocha' ] ,
4
- 'env' : {
5
- 'es6' : true ,
6
- 'node' : true ,
7
- 'mocha' : true ,
8
- } ,
9
- 'extends' : [
10
- 'airbnb' ,
11
- 'plugin:@typescript-eslint/recommended' ,
12
- 'plugin:mocha/recommended'
2
+ parser : '@typescript-eslint/parser' ,
3
+ plugins : [ '@typescript-eslint' , 'mocha' ] ,
4
+ env : {
5
+ es6 : true ,
6
+ node : true ,
7
+ mocha : true ,
8
+ } ,
9
+ extends : [
10
+ 'airbnb' ,
11
+ 'plugin:@typescript-eslint/recommended' ,
12
+ 'plugin:mocha/recommended' ,
13
+ ] ,
14
+ parserOptions : {
15
+ ecmaVersion : 2018 ,
16
+ sourceType : 'module' ,
17
+ } ,
18
+ rules : {
19
+ 'react/jsx-filename-extension' : 'off' ,
20
+ '@typescript-eslint/no-explicit-any' : 'off' ,
21
+ indent : [
22
+ 'error' ,
23
+ 2 ,
13
24
] ,
14
- 'parserOptions' : {
15
- 'ecmaVersion' : 2018 ,
16
- 'sourceType' : 'module'
17
- } ,
18
- 'rules' : {
19
- "react/jsx-filename-extension" : 'off' ,
20
- '@typescript-eslint/no-explicit-any' : 'off' ,
21
- 'indent' : [
22
- 'error' ,
23
- 2
24
- ] ,
25
- 'import/prefer-default-export' : 'off' ,
26
- 'linebreak-style' : [ 'error' , 'unix' ] ,
27
- 'quotes' : [ 'error' , 'single' ] ,
28
- 'semi' : [ 'error' , 'never' ] ,
29
- 'import/no-unresolved' : 'off' ,
25
+ 'import/prefer-default-export' : 'off' ,
26
+ 'linebreak-style' : [ 'error' , 'unix' ] ,
27
+ quotes : [ 'error' , 'single' ] ,
28
+ semi : [ 'error' , 'never' ] ,
29
+ 'import/no-unresolved' : 'off' ,
30
+ 'func-names' : 'off' ,
31
+ 'no-underscore-dangle' : 'off' ,
32
+ 'guard-for-in' : 'off' ,
33
+ 'no-restricted-syntax' : 'off' ,
34
+ 'no-await-in-loop' : 'off' ,
35
+ 'object-curly-newline' : 'off' ,
36
+ 'import/extensions' : 'off' ,
37
+ 'mocha/no-hooks-for-single-case' : 'off' ,
38
+ 'no-param-reassign' : 'off' ,
39
+ } ,
40
+ ignorePatterns : [
41
+ '*/build/**/*' ,
42
+ '*.json' ,
43
+ '*.txt' ,
44
+ '*.md' ,
45
+ '*.lock' ,
46
+ '*.log' ,
47
+ '*.yaml' ,
48
+ '**/*/frontend/assets/**/*' ,
49
+ '*.d.ts' ,
50
+ ] ,
51
+ overrides : [
52
+ {
53
+ files : [
54
+ '*-test.js' ,
55
+ '*.spec.js' ,
56
+ '*-test.ts' ,
57
+ '*.spec.ts' ,
58
+ '*.spec.tsx' ,
59
+ '*.factory.ts' ,
60
+ '*.factory.js' ,
61
+ ] ,
62
+ rules : {
63
+ 'no-unused-expressions' : 'off' ,
30
64
'func-names' : 'off' ,
31
- 'no-underscore-dangle' : 'off' ,
32
- 'guard-for-in' : 'off' ,
33
- 'no-restricted-syntax' : 'off' ,
34
- 'no-await-in-loop' : 'off' ,
35
- 'object-curly-newline' : 'off' ,
36
- 'import/extensions' : 'off' ,
37
- 'mocha/no-hooks-for-single-case' : 'off' ,
38
- 'no-param-reassign' : 'off' ,
65
+ 'prefer-arrow-callback' : 'off' ,
66
+ 'import/no-extraneous-dependencies' : 'off' ,
67
+ 'mocha/no-mocha-arrows' : 'off' ,
68
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
69
+ } ,
39
70
} ,
40
- overrides : [
41
- {
42
- files : [
43
- '*-test.js' ,
44
- '*.spec.js' ,
45
- '*-test.ts' ,
46
- '*.spec.ts' ,
47
- '*.spec.tsx' ,
48
- '*.factory.ts' ,
49
- '*.factory.js'
50
- ] ,
51
- rules : {
52
- 'no-unused-expressions' : 'off' ,
53
- 'func-names' : 'off' ,
54
- 'prefer-arrow-callback' : 'off' ,
55
- 'import/no-extraneous-dependencies' : 'off' ,
56
- 'mocha/no-mocha-arrows' : 'off' ,
57
- '@typescript-eslint/explicit-function-return-type' : 'off' ,
58
- } ,
59
- } ,
60
- {
61
- files : [ '*.jsx' , '*.js' ] ,
62
- rules : {
63
- "@typescript-eslint/explicit-function-return-type" : 'off'
64
- }
65
- } ,
66
- {
67
- files : [ '*.tsx' ] ,
68
- rules : {
69
- "react/prop-types" : 'off'
70
- }
71
- } ,
72
- {
73
- files : [ '**/*/cypress/integration/**/*.spec.js' ] ,
74
- rules : {
75
- 'mocha/no-mocha-arrows' : 'off' ,
76
- 'spaced-comment' : 'off'
77
- }
78
- } ,
79
- ] ,
80
- globals : {
81
- 'expect' : true ,
82
- 'factory' : true ,
83
- 'sandbox' : true ,
84
- 'server' : true ,
85
- 'window' : true ,
86
- 'AdminBro' : true ,
87
- 'flatpickr' : true ,
88
- 'FormData' : true ,
89
- 'File' : true ,
90
- 'cy' : true ,
91
- 'Cypress' : true ,
92
- }
93
- }
71
+ {
72
+ files : [ '*.jsx' , '*.js' ] ,
73
+ rules : {
74
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
75
+ } ,
76
+ } ,
77
+ {
78
+ files : [ '*.tsx' ] ,
79
+ rules : {
80
+ 'react/prop-types' : 'off' ,
81
+ } ,
82
+ } ,
83
+ {
84
+ files : [ '**/*/cypress/integration/**/*.spec.js' ] ,
85
+ rules : {
86
+ 'mocha/no-mocha-arrows' : 'off' ,
87
+ 'spaced-comment' : 'off' ,
88
+ } ,
89
+ } ,
90
+ ] ,
91
+ globals : {
92
+ expect : true ,
93
+ factory : true ,
94
+ sandbox : true ,
95
+ server : true ,
96
+ window : true ,
97
+ AdminBro : true ,
98
+ flatpickr : true ,
99
+ FormData : true ,
100
+ File : true ,
101
+ cy : true ,
102
+ Cypress : true ,
103
+ } ,
104
+ }
0 commit comments