-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.yml
123 lines (116 loc) · 3.75 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
extends: react-app
globals:
If: true
Choose: true
When: true
Otherwise: true
shallow: true
render: true
mount: true
enzymeToJson: true
BoostProvider: true
plugins: [
react-hooks,
emotion
]
rules:
#styles
block-spacing: ['error']
array-bracket-spacing: ['warn', 'never']
comma-dangle: ['warn', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline'
}]
comma-spacing: ['warn', { 'before': false, 'after': true }]
computed-property-spacing: ['warn']
indent: ['warn', 2, { 'SwitchCase': 1 }]
jsx-quotes: ['warn']
key-spacing: ['warn', { 'afterColon': true }]
keyword-spacing: ['warn', { 'before': true }]
no-multiple-empty-lines: ['warn', { 'max': 2, 'maxBOF': 0}]
object-curly-spacing: ['warn', 'always', { 'objectsInObjects': false }]
operator-assignment: ['error', 'always']
quotes: ['warn', 'single']
quote-props: ['warn', 'as-needed']
semi: ['warn', 'always']
semi-spacing: 'warn'
space-before-blocks: 'warn'
space-in-parens: ['warn', 'never']
space-infix-ops: 'warn'
space-unary-ops: 'warn'
arrow-spacing: 'warn'
template-curly-spacing: 'warn'
no-multi-spaces: 'warn'
no-trailing-spaces: 'warn'
eol-last: ['warn', 'always']
#badcode
no-unused-vars: ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }]
no-multi-assign: 'error'
no-extra-semi: 'error'
semi-style: 'error'
no-unneeded-ternary: 'error'
callback-return: 'error'
import/no-duplicates: 'error'
no-useless-computed-key: 'error'
no-var: 'error'
init-declarations: ['error', 'always']
no-delete-var: 'error'
no-restricted-globals: ['error']
no-use-before-define: 'error'
dot-notation: 'warn'
no-alert: 'error'
no-console: 'warn'
max-len: ['warn', { 'code': 150, 'ignoreComments': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true }]
#es6
no-const-assign: 'error'
object-shorthand: 'error'
prefer-arrow-callback: 'error'
prefer-const: 'error'
prefer-destructuring: ['error', { 'object': true }]
prefer-numeric-literals: 'error'
prefer-rest-params: 'warn'
prefer-spread: 'warn'
prefer-template: 'warn'
rest-spread-spacing: ['error', 'never']
#react
react/forbid-foreign-prop-types: 'error'
react/no-children-prop: 'error'
react/jsx-curly-spacing: [1, {'when': 'always', 'children': true, 'allowMultiline': true, 'spacing': {'objectLiterals': 'never'}}]
react/no-danger: 'warn'
react/no-danger-with-children: 'error'
react/no-direct-mutation-state: 'error'
react/no-find-dom-node: 'error'
react/no-is-mounted: 'error'
react/no-redundant-should-component-update: 'warn'
react/no-string-refs: 'error'
react/no-unknown-property: 'error'
react/no-unused-prop-types: 'warn'
react/no-will-update-set-state: 'error'
react/prefer-es6-class: ['error', 'always']
react/require-render-return: 'error'
react/self-closing-comp: ['error', { 'component': true, 'html': true }]
react/style-prop-object: 'error'
react/void-dom-elements-no-children: 'error'
react/jsx-boolean-value: 'warn'
react/jsx-closing-tag-location: 'warn'
react/jsx-equals-spacing: [2, 'never']
react/jsx-indent: ['warn', 2]
react/jsx-key: 'error'
react/jsx-no-duplicate-props: 'error'
react/jsx-no-undef: ['warn', { allowGlobals: true }]
react/jsx-pascal-case: 'warn'
react/jsx-tag-spacing: ['warn', 'always' ]
react/jsx-uses-react: 'warn'
react/jsx-uses-vars: 'warn'
react/jsx-wrap-multilines: 'warn'
react/jsx-curly-brace-presence: ['warn', { 'props': 'never' }]
react-hooks/rules-of-hooks: "error"
react-hooks/exhaustive-deps: "warn"
jsx-a11y/aria-role: 'off'
#emotion
emotion/no-vanilla: "error"
emotion/import-from-emotion: "error"
emotion/styled-import: "error"