This repository was archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.yml
120 lines (94 loc) · 2.37 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
extends: 'airbnb'
env:
browser: true
jest: true
globals:
chrome: false
rules:
arrow-parens:
- error
- as-needed
- requireForBlockBody: true
jsx-a11y/interactive-supports-focus:
- off
jsx-a11y/click-events-have-key-events:
- off
# ensure consistency when using newlines within a function’s parens
function-paren-newline:
- error
- consistent
# object keys must have at least one space after the colon
key-spacing:
- error
- mode: 'minimum'
# Allow index files in cyclical dependency tracking
import/no-cycle:
- error
- maxDepth: 1
lines-between-class-members:
- off
# allow console use
no-console:
- off
# though we don’t enforce, only use multi spaces for alignment
no-multi-spaces:
- off
# Allow extra lines for grouping functionality
no-multiple-empty-lines:
- error
- max: 2
maxBOF: 0
maxEOF: 0
# prevent unused expressions that have no effect on program state
no-unused-expressions:
- error
- allowShortCircuit: true
allowTernary: true
# remove all unused variables
no-unused-vars:
- error
- argsIgnorePattern: '^_' # ignore vars with a _ prefix (e.g. _foo)
# Place operators at the ends of lines when doing linebreaks
operator-linebreak:
- error
- after
# though we don’t enforce, prefer destructuring when it makes sense
prefer-destructuring:
- off
# though we don’t enforce, prefer destructuring props only when its minimal; it’s better to be
# explicit about where they’re coming from
react/destructuring-assignment:
- off
# allow multiple expressions on the same line, e.g. `<App><Hello /> World</App>`
react/jsx-one-expression-per-line:
- off
# allow defining props with a spread, e.g. <foo {...props} />
react/jsx-props-no-spreading:
- off
react/sort-comp:
- error
- order:
- static-variables
- static-methods
- lifecycle
- everything-else
- render
react/static-property-placement:
- error
- static public field
# never use semi-colons
semi:
- error
- never
overrides:
- files:
- '**/*.test.js'
rules:
max-classes-per-file: off
parser: 'babel-eslint'
settings:
import/resolver:
babel-module: {}
# Use our webpack configuration for resolving modules
webpack:
config: 'webpack.config.js'