This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
/
.eslintrc
84 lines (77 loc) · 2.04 KB
/
.eslintrc
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
---
plugins:
- mocha
- nodate
parser: espree
parserOptions:
ecmaVersion: 2017
sourceType: "module"
env:
browser: true
node: true
es6: true
jasmine: true
mocha: true
globals:
__DEV__: true
jest: true
sinon: true
chai: true
spy: true
stub: true
rules:
# ERRORS
space-before-blocks: 2
indent: [2, 2, { "SwitchCase": 1 }]
semi: [2, "always"]
comma-dangle: [2, "never"]
no-unused-expressions: 2
block-scoped-var: 2
dot-notation: 2
consistent-return: 2
no-unused-vars: [2, args: none]
quotes: [2, 'single']
space-infix-ops: 2
no-else-return: 2
no-extra-parens: [2, "all", { "nestedBinaryExpressions": false }]
no-eq-null: 2
no-floating-decimal: 2
no-param-reassign: 2
no-self-compare: 2
wrap-iife: [2, "inside"]
brace-style: [2, "1tbs", { "allowSingleLine": false }]
object-curly-spacing: [1, "always"]
func-style: [2, "expression"]
no-lonely-if: 2
space-in-parens: [2, "never"]
space-before-function-paren: [2, {
"anonymous": "ignore",
"named": "never",
"asyncArrow": "ignore"
}]
generator-star-spacing: [2, "neither"]
spaced-comment: [2, "always"]
eol-last: 2
no-multi-spaces: 2
curly: [2, "multi"]
camelcase: [2, {properties: "never"}]
no-eval: 2
no-var: 2
max-len: [2, 120]
complexity: [2, 6]
arrow-parens: [2, "always"]
nodate/no-date: 2 # use of Date (instead of abacus-moment)
nodate/no-new-date: 2
nodate/no-moment: 2
nodate/no-moment-without-utc: 2
# WARNINGS
no-use-before-define: 1 # We use this for functions that reference each other
mocha/no-exclusive-tests: 1 # warn for exclusive (.only) tests
valid-jsdoc: 1
# DISABLED. These aren't compatible with our style
no-underscore-dangle: 0 # We use this for private/internal variables
new-cap: 0 # We pass constructors around / access them from members
key-spacing: 0 # We do this in a few places to align values
space-after-keywords: 0 # We do this a lot
no-shadow: 0 # We do this mostly for callbacks
space-in-brackets: 0 # We do not use spaces in brackets but use spaces in braces