forked from RedHatInsights/policies-ui-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
177 lines (177 loc) · 3.4 KB
/
.eslintrc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
parser: '@typescript-eslint/parser'
env:
browser: true
node: true
es6: true
settings:
react:
version: '16.0'
plugins:
- react-hooks
- jest
- jest-dom
- testing-library
- simple-import-sort
extends:
- plugin:@typescript-eslint/recommended
- prettier
- plugin:react/recommended
- plugin:jest/recommended
- plugin:jest-dom/recommended
- plugin:testing-library/react
parserOptions:
ecmaVersion: 7
sourceType: module
globals:
beforeAll: true
describe: true
expect: true
global: true
insights: true
it: true
mount: true
process: true
render: true
shallow: true
React: true
rules: # Todo: Remove javascript rules that are duplicated on typescript
simple-import-sort/imports: error
simple-import-sort/exports: error
'@typescript-eslint/explicit-function-return-type':
- off
'@typescript-eslint/explicit-module-boundary-types':
- off
'@typescript-eslint/no-explicit-any':
- off
'@typescript-eslint/no-unused-vars':
- error
- argsIgnorePattern: '^_'
ignoreRestSiblings: true
'@typescript-eslint/naming-convention':
- error
- selector: default
format:
- camelCase
- PascalCase
- snake_case
- UPPER_CASE
leadingUnderscore: allow
trailingUnderscore: allow
- selector: variable
format:
- PascalCase
- camelCase
- UPPER_CASE
leadingUnderscore: allow
trailingUnderscore: allow
- selector: typeLike
format:
- PascalCase
- UPPER_CASE
- selector: property
modifiers:
- readonly
format:
- UPPER_CASE
- camelCase
leadingUnderscore: allow
trailingUnderscore: allow
array-bracket-spacing:
- error
- always
- objectsInArrays: false
comma-dangle: 2
comma-spacing:
- 2
- after: true
comma-style: 2
curly:
- error
- all
dot-notation: 2
eol-last: 2
eqeqeq: 2
func-names:
- error
- never
indent:
- error
- 4
- SwitchCase: 1
MemberExpression: 0
ImportDeclaration: 1
ObjectExpression: 1
react/jsx-curly-spacing:
- error
- always
- allowMultiline: false
- spacing:
- objectLiterals:
- never
react/prop-types: off
react/jsx-tag-spacing:
- error
- closingSlash: never
beforeSelfClosing: always
afterOpening: never
beforeClosing: allow
react-hooks/rules-of-hooks: error
react-hooks/exhaustive-deps: error
key-spacing: 2
keyword-spacing: 2
linebreak-style:
- error
- unix
max-len:
- 2
- 150
new-cap: 2
no-bitwise: 2
no-caller: 2
no-console: off
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines:
- error
- max: 1
no-trailing-spaces: 2
no-undef: 2
no-var: 2
no-with: 2
object-shorthand: 2
object-curly-spacing:
- error
- always
- objectsInObjects: false
arraysInObjects: false
one-var:
- error
- never
padding-line-between-statements:
- error
- blankLine: always
prev: block-like
next: '*'
quote-props:
- error
- as-needed
quotes:
- error
- single
- allowTemplateLiterals: true
semi:
- error
- always
no-extra-semi:
- error
space-before-blocks: 2
space-in-parens: 2
space-infix-ops: 2
space-unary-ops:
- error
- words: false
nonwords: false
vars-on-top: 2
wrap-iife: 2
yoda:
- error
- never