-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.yml
70 lines (59 loc) · 2.19 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
parser: '@typescript-eslint/parser'
settings:
import/core-modules: [electron]
plugins:
- '@typescript-eslint'
- import
ignorePatterns:
- app/
- node_modules/
- build/
- esbuilder.js # this is just a hacked together dev building file that uses esbuild. not even in ts
extends:
- raven
- plugin:@typescript-eslint/recommended
- airbnb-typescript/base
parserOptions:
project: ./tsconfig.json
sourceType: module
rules:
# typescript
'@typescript-eslint/indent': [error, tab]
'@typescript-eslint/comma-dangle': [error, never]
'@typescript-eslint/space-before-function-paren': [error, never]
'@typescript-eslint/no-use-before-define': 0 # triggers mentioning stuff in callback functions
'@typescript-eslint/ban-ts-comment': 0 # i already use @ts-ignore sparingly
'@typescript-eslint/no-throw-literal': 0 # some errors are fine as a string
'@typescript-eslint/semi': 1
'@typescript-eslint/quotes': 1
'@typescript-eslint/no-unused-vars': 1
'@typescript-eslint/ban-types': 0
# general
"prefer-destructuring": [error, {"object": true, "array": false}]
no-trailing-spaces: [error, { ignoreComments: true }]
prefer-named-capture-group: 0
linebreak-style: 0
no-console: 0
no-empty: [error, { "allowEmptyCatch": true }]
# init-declarations: ["warn", "always"]
init-declarations: 0
complexity: 0
# stuff i deliberately use
no-void: 0
# COMMENTS
# i tried configuring these so it's either inline or above, not both, but couldn't figure it out
# the current plan is just manually reviewing prs (which i'd do anyway) and if it's over commented i'd request changes
line-comment-position: 0
no-inline-comments: 0
multiline-comment-style: ["error", "starred-block"]
no-warning-comments: 0 # use TODO and FIXME
spaced-comment: ["warn", "always", { "markers": ["/"] }] # ignore for ts path reference
# VISUAL
max-len: ["error", { "code": 220, "tabWidth": 4 }]
# ignore some common ones (forloop, arrow functions, error/event paramter) but warn about others
id-length: ["error", { "exceptions": ["e", "u", "i", "j"] }]
sort-keys: 0
sort-imports: 0
env:
browser: true
node: true