-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path.eslintrc.yml
119 lines (119 loc) · 2.63 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
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
115
116
117
118
119
env:
browser: true
es6: true
node: true
plugins:
- prettier
parser: '@typescript-eslint/parser'
extends:
- 'eslint:recommended'
- 'plugin:prettier/recommended'
parserOptions:
ecmaVersion: 2020
sourceType: module
globals:
Atomics: readonly
BigInt: readonly
SharedArrayBuffer: readonly
globalThis: readonly
ignorePatterns:
- node_modules/
- dist/
- tsc-out/
- test262/
rules:
array-element-newline:
- error
- consistent
arrow-parens: error
arrow-spacing: error
brace-style:
- error
- 1tbs
comma-dangle: error
comma-spacing: error
curly:
- error
- multi-line
func-call-spacing: off
function-call-argument-newline:
- error
- consistent
indent:
- error
- 2
- SwitchCase: 1
keyword-spacing: error
max-len:
- error
- code: 120
ignoreRegExpLiterals: true
no-alert: error
no-console: error
no-multiple-empty-lines:
- error
- max: 1
no-trailing-spaces: error
no-param-reassign:
- error
- props: false
object-curly-spacing:
- error
- always
object-property-newline:
- error
- allowAllPropertiesOnSameLine: true
prefer-const:
- off # TODO re-enable
# - destructuring: "all"
quote-props:
- error
- as-needed
quotes:
- error
- single
- avoidEscape: true
semi: error
space-infix-ops: error
overrides:
- files:
- lib/duration.ts
- lib/init.js
- test/all.mjs
- test/exhaust.mjs
- test/validStrings.mjs
rules:
no-console: off
- files:
- test/*.mjs
- test/**/*
rules:
no-param-reassign: off
- files:
- '**/*.ts'
plugins:
- '@typescript-eslint'
parserOptions:
ecmaVersion: 2020
sourceType: module
project:
- './tsconfig.json'
- './tools/tsconfig.json'
extends:
- 'plugin:@typescript-eslint/recommended'
# TODO turn this on - it catches lots of implicit 'any's
# - 'plugin:@typescript-eslint/recommended-requiring-type-checking'
rules:
'@typescript-eslint/explicit-module-boundary-types': off
'@typescript-eslint/no-empty-function': error
'@typescript-eslint/no-empty-interface':
- error
- allowSingleExtends: true
'@typescript-eslint/no-var-requires': off
'@typescript-eslint/ban-ts-comment': off
'@typescript-eslint/no-explicit-any': off # Todo re-enable this
'@typescript-eslint/no-unnecessary-type-assertion': error
'@typescript-eslint/func-call-spacing': error
'@typescript-eslint/consistent-type-exports': error
'@typescript-eslint/consistent-type-imports': error
prefer-const: off