-
Notifications
You must be signed in to change notification settings - Fork 73
/
.eslint.base.yml
54 lines (52 loc) · 1.55 KB
/
.eslint.base.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
rules:
# Best Practices (https://eslint.org/docs/rules/#best-practices)
curly: [warn, all]
dot-notation: [error, allowPattern: '^[a-z]+(_[a-z]+)+$']
eqeqeq: [warn, always]
guard-for-in: error
no-new-func: error
no-new-wrappers: error
no-param-reassign: error
no-return-assign: [warn, always]
no-return-await: error
no-self-compare: error
no-sequences: error
no-throw-literal: error
no-unmodified-loop-condition: error
no-unused-expressions: error
no-useless-concat: error
no-useless-return: error
no-void: error
no-with: error
wrap-iife: [error, inside]
yoda: [error, never, exceptRange: true]
# Stylistic Issues (https://eslint.org/docs/rules/#stylistic-issues)
func-style: [error, declaration, allowArrowFunctions: true]
no-mixed-operators:
- error
- groups:
- ['&', '|', '^', '~', '<<', '>>', '>>>']
- ['==', '!=', '===', '!==', '>', '>=', '<', '<=']
- ['&&', '||']
- [in, instanceof]
allowSamePrecedence: true
no-multi-assign: error
no-negated-condition: error
no-new-object: error
no-plusplus: [error, allowForLoopAfterthoughts: true]
no-unneeded-ternary: error
operator-assignment: [error, always]
prefer-object-spread: error
spaced-comment:
- warn
- always
- block:
balanced: true
# ECMAScript 6 (https://eslint.org/docs/rules/#ecmascript-6)
arrow-body-style: [error, as-needed]
no-confusing-arrow: [error, allowParens: true]
no-var: error
prefer-const: error
prefer-rest-params: error
prefer-spread: error
prefer-template: error