-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.yml
63 lines (63 loc) · 2.62 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
env:
es6: true
node: true
extends:
- airbnb-base
- plugin:jest/recommended
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 2018
sourceType: module
plugins:
- jest
rules: # See https://eslint.org/docs/rules
semi:
- error
- always # Always put commas, to avoid multilines git diff when new lines are added
quotes:
- error
- single # Prefer simple quotes
- allowTemplateLiterals: true # Allow the use of `` instead of '' and don't try to replace it, even when `` isn't needed
comma-spacing:
- error
- before: false
after: true
indent:
- error
- 2
arrow-parens:
- error
- always
max-len: 0 # Disable line length checks, because the IDE is already configured to warn about it, and it's a waste of time to check for lines that are too long, especially in comments (like this one!)
strict: 'off'
no-console: 2 # Shouldn't use "console", but "logger" instead
allowArrowFunctions: 0
no-unused-vars:
- error
- args: none # Allow to declare unused variables in function arguments, meant to be used later
import/prefer-default-export: 0 # When there is only a single export from a module, don't enforce a default export, but rather let developer choose what's best
no-else-return: 0 # Don't enforce, let developer choose. Sometimes we like to specifically use "return" for the sake of comprehensibility and avoid ambiguity
no-underscore-dangle: 0 # Allow _ before/after variables and functions, convention for something meant to be "private"
arrow-body-style: 0 # Don't enforce, let developer choose. Sometimes we like to specifically use "return" for ease of debugging and printing
quote-props:
- warn
- consistent-as-needed # Enforce consistency with quotes on props, either all must be quoted, or all unquoted for a given object
no-return-await: 0 # Useful before, but recent node.js enhancements make it useless on node 12+ (we use 10, but still, for consistency) - Read https://stackoverflow.com/questions/44806135/why-no-return-await-vs-const-x-await
no-extra-boolean-cast: 0 # Don't enforce, let developer choose. Using "!!!" is sometimes useful (edge cases), and has a semantic value (dev intention)
object-curly-newline:
- warn
- ObjectExpression:
multiline: true
minProperties: 5
consistent: true
ObjectPattern:
multiline: true
minProperties: 5
consistent: true
ImportDeclaration: never # Would conflict with WebStorm settings (WebStorm does the job better)
ExportDeclaration:
multiline: true
minProperties: 5
consistent: true