-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
61 lines (57 loc) · 1.5 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
51
52
53
54
55
56
57
58
59
60
61
module.exports = {
root: true,
env: {
es6: true,
node: true,
jest: true,
},
extends: [
// '@react-native-community',
'airbnb-typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
ignorePatterns: [
'.eslintrc.js',
'*.js',
'*.d.ts',
],
plugins: ['react', 'react-hooks', '@typescript-eslint'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'no-multiple-empty-lines': 0,
'no-trailing-spaces': 0,
'max-len': ['error', 120, 4, {'ignoreComments': true}],
'implicit-arrow-linebreak': 0,
'arrow-body-style': 0, // we have comments in empty function body
'spaced-comment': 0,
'no-confusing-arrow': 0,
'no-nested-ternary': 0,
'import/prefer-default-export': 0,
'prefer-arrow-callback': 0,
'react/no-unused-prop-types': 'warn',
'react/jsx-indent-props': [2, 2],
'react/jsx-boolean-value': ['error', 'always'],
'react/jsx-curly-spacing': [2, 'always', {'spacing': { 'objectLiterals': 'never' }}], // spaces for jsx components props
'react/jsx-props-no-multi-spaces': 0,
'react/destructuring-assignment': 0,
'react/jsx-props-no-spreading': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-unused-vars': 'warn'
},
"overrides": [
{
// ignore prop-types in mixed JS/TypeScript projects
"files": ["**/*.ts?(x)"],
"rules": {
"react/prop-types": "off"
}
}
]
};