-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.yml
More file actions
104 lines (91 loc) · 2.1 KB
/
.eslintrc.yml
File metadata and controls
104 lines (91 loc) · 2.1 KB
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
plugins:
- react
extends:
- 'eslint:recommended'
parserOptions:
sourceType: module
ecmaVersion: 6
ecmaFeatures:
jsx: true
impliedStrict: true
globals:
Routes: true
env:
browser: true
es6: true
rules:
no-undef: error
semi: error
no-unexpected-multiline: error
no-extra-parens:
- error
- all
- ignoreJSX: multi-line
no-unsafe-negation: warn
complexity:
- warn
- 4
curly:
- warn
- all
no-alert: error
no-extra-bind: error
no-eval: error
radix:
- error
- always
no-shadow: error
prefer-const: error
# Class Layout
no-useless-constructor: error
# Code style
indent:
- error
- 2
yoda:
- warn
- never
brace-style:
- error
- 1tbs
linebreak-style:
- error
- unix
no-multi-spaces: error
padded-blocks:
- error
- never
spaced-comment: error
semi-spacing: error
keyword-spacing: error
sort-keys: error
eqeqeq: error
no-floating-decimal: error
dot-notation: error
dot-location:
- error
- property
# Control Flow
max-depth:
- error
- 3
no-implicit-coercion: error
no-confusing-arrow: error
space-infix-ops:
- error
- int32Hint: false
space-before-blocks: error
space-before-function-paren:
- error
- never
space-in-parens:
- error
- never
no-restricted-syntax:
- error
- selector: IfStatement > BinaryExpression[right.type='Literal'] > MemberExpression[property.name='name'] > MemberExpression[object.type='Identifier'][property.name='constructor']
message: 'foo.prototype.name does always not survive minification. Use instanceof instead'
- selector: CallExpression > MemberExpression[object.type='Identifier'][object.name='$'][property.type='Identifier'][property.name='extend']
message: 'Prefer Object.assign or {... object} over jQuery $.extend as these methods are built-in to the browser.'
- selector: CallExpression[callee.object.name='Object'][callee.property.name='assign'] > ObjectExpression:not(:matches([attr] > :first-child, :first-child))
message: 'Prefer Object.assign({foo: bar}, ...) over Object.assign({}, {foo:bar}, ...) to reduce the number of objects created'