-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.eslintrc.js
50 lines (50 loc) · 1.08 KB
/
.eslintrc.js
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
module.exports = {
parser: '@typescript-eslint/parser',
root: true,
env: {
es6: true,
},
extends: [
'eslint:recommended',
'airbnb',
'airbnb/hooks',
'./lint/.eslintrc-import.js',
'./lint/.eslintrc-typescript.js',
'./lint/.eslintrc-react.js',
'prettier',
],
plugins: ['prettier'],
rules: {
'prettier/prettier': 'error',
'no-console': 'off',
'no-void': 'off',
'consistent-return': 'off',
'no-array-constructor': 'off',
'no-underscore-dangle': [
'error',
{
allow: ['_id'],
},
],
'no-restricted-syntax': [
'error',
'ForStatement',
'ForInStatement',
'ForOfStatement',
'ContinueStatement',
'DoWhileStatement',
'WhileStatement',
'WithStatement',
// REACT
{
selector: 'MemberExpression[object.name="React"]',
message: 'Use of React.method is not allowed.',
},
// TYPESCRIPT
{
selector: 'TSTypeReference[typeName.left.name="React"]',
message: 'Use of React.type is not allowed.',
},
],
},
};