This repository has been archived by the owner on May 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
/
.eslintrc.yaml
114 lines (91 loc) · 2.53 KB
/
.eslintrc.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
# parser: babel-eslint # we're not currently transpiling this SDK
root: true
extends:
- eslint:recommended # https://eslint.org/docs/rules/
env:
es6: true
node: true
parserOptions:
ecmaVersion: 2018
plugins:
#- babel
- prettier
globals:
VERSION: true
describe: true
it: true
expect: true
jest: true
beforeEach: true
afterEach: true
window: false # don't allow references to "window" or "document" in the Node SDK
document: false
rules:
# https://eslint.org/docs/rules/array-callback-return
array-callback-return: error
# https://eslint.org/docs/rules/arrow-body-style
arrow-body-style:
- error
- as-needed
# https://github.com/babel/eslint-plugin-babel
#babel/semi: error
# Deprecations are required to turn enforce this
camelcase: warn
# https://eslint.org/docs/rules/curly
curly:
- error
- all
# https://eslint.org/docs/rules/eqeqeq
eqeqeq: error
# https://eslint.org/docs/rules/no-array-constructor
no-array-constructor: error
# https://eslint.org/docs/rules/no-eval
no-eval: error
# https://eslint.org/docs/rules/no-implicit-coercion
no-implicit-coercion:
- 'off'
- boolean: false
number: true
string: true
allow: []
# https://eslint.org/docs/rules/no-implied-eval
no-implied-eval: error
# https://eslint.org/docs/rules/no-nested-ternary
no-nested-ternary: error
# https://eslint.org/docs/rules/no-new-object
no-new-object: error
# https://eslint.org/docs/rules/no-new-wrappers
no-new-wrappers: error
# https://eslint.org/docs/rules/no-param-reassign
no-param-reassign:
- error
- props: true
# https://eslint.org/docs/rules/no-restricted-syntax
no-restricted-syntax:
- error
- selector: ForInStatement
message: avoid for...in which can pick up properties from prototypes; use for...of, or plain for if you need array indices
# https://eslint.org/docs/rules/no-return-assign
no-return-assign: error
# https://eslint.org/docs/rules/no-self-compare
no-self-compare: error
# https://eslint.org/docs/rules/no-use-before-define
no-use-before-define:
- error
- functions: false
# https://eslint.org/docs/rules/no-var
no-var: error
# https://eslint.org/docs/rules/prefer-arrow-callback
prefer-arrow-callback: error
# https://eslint.org/docs/rules/prefer-const
prefer-const: error
# https://github.com/prettier/eslint-plugin-prettier
prettier/prettier:
- error
quotes:
- error
- single
- avoidEscape: true
# https://eslint.org/docs/rules/radix
radix: error