-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.eslintrc.yml
145 lines (106 loc) · 3.11 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Import and use airbnb code style
extends: airbnb-base
env:
es6: true
node: true
parserOptions:
ecmaVersion: 6
rules:
# Requires braces around arrow functions
# Doesn't work with promise chain return functions
arrow-body-style:
- error
- as-needed
# Should only have parentheses if arrow function has more than 1 argument
arrow-parens:
- error
- as-needed
# Expects commas after functions
comma-dangle:
- error
- arrays: always
objects: always
imports: never
exports: never
functions: ignore
# Functions do not always need a return
consistent-return: 0
# Functions can be anonymous
func-names: 0
# require() does not need to be at the top of the page
global-require: 0
# For in loops do not need to be wrapped in an if statment to protect from type
guard-for-in: 0
# make sure spaces are 4 instead of tabs
indent:
- error
- 4
- SwitchCase: 1
# prevent LF vs CRLF errors
linebreak-style: 0
# do not worry about a line length, default max length is 100
max-len: 0
# allow ~~
no-bitwise: 0
# allow old buffer constructor
no-buffer-constructor: 0
# console is allowed
no-console: 0
# allow the use of 'continue' within loops
no-continue: 0
# allow !!
no-extra-boolean-cast: 0
# allow 'for' loop and switch statement labels
no-labels: 0
# allow consecutive operators without parentheses
no-mixed-operators: 0
# allow multiple lines greater than 2
no-multiple-empty-lines:
- error
- max: 2
maxEOF: 1
# do not reassign function param variables, properties of the variable are alright
no-param-reassign: 0
# allow i++ and i--
no-plusplus: 0
# able to do this 'foo.hasOwnProperty('bar')' vs only this 'Object.prototype.hasOwnProperty.call(foo, 'bar')'
no-prototype-builtins: 0
# we should be able to use all properties - this allow the use of Math.pow
no-restricted-properties: 0
# do not prevent any javascript syntax, 'class, try-catch...'
no-restricted-syntax: 0
# child functions can have variables named the same as the parent
no-shadow: 0
# allow underscore prefixed properties on objects
no-underscore-dangle: 0
# no unused vars, except for function arguments
no-unused-vars:
- error
- args: none
# functions are allowed to be hoisted
no-use-before-define: 0
# regex escape, might need to support older regex?
no-useless-escape: 0
# don't always need arrow functions within objects
object-shorthand: 0
# do not worry about the spacing within the block
padded-blocks:
- error
- switches: never
# arrow functions are not always necessary
prefer-arrow-callback: 0
# when using let instead of const and no reassignment, only give a erroring, no error
prefer-const:
- error
# prefer using `hello, ${name}` vs 'hello, ' + name
prefer-template: 0
# parse functions don't require a radix, defaults to 10
radix:
- error
- as-needed
# do not enforce a space after a '//' comment
spaced-comment: 0
# we need to have 'use strict' right now until we get our new web server set up
strict:
- 0
- global