-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.yml
63 lines (63 loc) · 1.86 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
root: true
extends:
- eslint:recommended
- plugin:import/errors
- plugin:import/warnings
parser: "babel-eslint"
env:
# Add eslint globals
es6: true
# Add browser globals
browser: true
# Webpack adds a node environment
node: true
settings:
import/extensions: ['.js']
rules:
# Semantic rules
# Forbid `var` in favour of `const` and `let`
no-var: error
# Prefer constants
prefer-const: error
# and warn about assignment to constants
no-const-assign: error
# Recommend a parent constructor call
constructor-super: error
# Disallow object attribute access before parent constructor call
no-this-before-super: warn
# Warn about useless constructors
no-useless-constructor: error
# Style rules
# Prefer arrow functions for function() {} in callbacks
prefer-arrow-callback: error
# Prefer rest ...arg over arguments magic variable
prefer-rest-params: error
# Prefer spread operator over .apply()
prefer-spread: error
# Prefer string template over string concatenation
prefer-template: error
# Require single quotes for Javascript
quotes: [error, single]
# Prefer double quotes in JSX templates
jsx-quotes: [error, prefer-double]
# Always require a semicolon to terminate statements
semi: [error, always]
# Indent with two spaces
indent: [error, 2]
# Keep braces on same line
brace-style: [error, 1tbs]
# 120 chars per line
max-len: [error, 120]
# Whitespace style
array-bracket-spacing: [error, never]
space-in-parens: [error, never]
template-curly-spacing: [error, never]
yield-star-spacing: [error, before]
generator-star-spacing: [error, before]
space-infix-ops: error
keyword-spacing: error
arrow-spacing: [error, {before: true, after: true}]
comma-spacing: [error, {before: false, after: true}]
key-spacing: [error, {beforeColon: false, afterColon: true}]
no-trailing-spaces: error
eol-last: error