-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
85 lines (65 loc) · 1.89 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
---
root: true
parser: babel-eslint
extends:
# http://eslint.org/docs/user-guide/configuring#using-eslintrecommended
- eslint:recommended
# https://www.npmjs.com/package/eslint-config-airbnb-base
- airbnb-base
plugins:
- import
- async-await
- jest
env:
es6: true
browser: true
node: true
jasmine: true
jest: true
parserOptions:
ecmaVersion: 2017
sourceType: module
rules:
### Different from airbnb config
### Styling ###
# better to ignore comments and others
max-len: off
# I prefer new line before error
# http://eslint.org/docs/rules/newline-before-return
newline-before-return: error # airbnb default: off
# I prefer double quotes
# http://eslint.org/docs/rules/quotes
quotes: [error, double] # airbnb default: ['error', 'single', { avoidEscape: true }]
# enforce no padding inside curly braces
#http://eslint.org/docs/rules/object-curly-spacing
object-curly-spacing: [error, never]
### Variables ###
# Functions and classes can be used before declaration
# http://eslint.org/docs/rules/no-use-before-define
no-use-before-define: # airbnb default: error
- error
-
functions: false
classes: false
### ES6 ###
# enforce usage of spacing in template strings
# http://eslint.org/docs/rules/template-curly-spacing
template-curly-spacing: [error, never] # airbnb default: error
### Best practices ###
# require or disallow Yoda conditions
yoda: [error, never, { exceptRange: true }]
# I prefer culry braces all the time
curly: [error, all] # airbnb default: [error, multi-line]
### Import ###
import/prefer-default-export: 0
import/first: 0
### Errors ###
no-console: 0
no-debugger: 0
### Async await ###
async-await/space-after-async: error
async-await/space-after-await: error
### Specific for this experiment project
# bitwise are used in this project
no-bitwise: 0
no-mixed-operators: 0