-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
83 lines (83 loc) · 1.87 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = {
env: {
browser: true,
es6: true
},
settings: {
react: {
version: 'detect'
}
},
extends: ['standard', 'plugin:react/recommended', 'plugin:jest/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react', 'jest'],
rules: {
'no-use-before-define': 'off',
'arrow-parens': ['error', 'as-needed'],
camelcase: 'warn',
'id-length': ['error', { exceptions: ['i', 'v'] }],
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect', '*.expect']
}
],
'jsx-quotes': ['error', 'prefer-single'],
'multiline-ternary': 'off',
'no-case-declarations': 'off',
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: false
}
],
'react/display-name': 'off',
'react/jsx-closing-bracket-location': [
'error',
{
nonEmpty: 'line-aligned',
selfClosing: 'line-aligned'
}
],
'react/jsx-closing-tag-location': 'error',
'react/jsx-curly-brace-presence': ['error', 'never'],
'react/jsx-curly-spacing': [
'error',
{
when: 'never',
attributes: true,
children: true
}
],
'react/jsx-equals-spacing': 'error',
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2],
'react/jsx-no-useless-fragment': 'error',
'react/jsx-tag-spacing': [
'error',
{
closingSlash: 'never',
beforeSelfClosing: 'always',
afterOpening: 'never',
beforeClosing: 'never'
}
],
'react/prop-types': 'off',
'react/self-closing-comp': [
'error',
{
component: true,
html: true
}
],
'space-before-function-paren': 'off'
}
}