-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy path.eslintrc.yml
83 lines (76 loc) · 2.08 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
root: true
extends:
- eslint-config-dmitmel/presets/node
env:
browser: true
parser: "@typescript-eslint/parser"
parserOptions:
sourceType: module
plugins:
- "@typescript-eslint"
rules:
func-names: off
node/no-unsupported-features/es-syntax:
- error
- ignores:
- modules
- dynamicImport
node/no-unsupported-features/es-builtins:
- error
- ignores:
- globalThis
node/no-unsupported-features/node-builtins:
- error
- ignores:
- fs.promises
node/no-missing-require: off
node/no-missing-import: off
node/no-unpublished-import: off
node/no-unpublished-require: off
node/shebang: off
no-process-exit: off
no-undef: off
no-undefined: off
no-unused-vars: off
new-cap: off
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: "^_"
overrides:
- files: "**/*.{ts,tsx,mts,cts}"
extends: eslint-config-dmitmel/presets/typescript-addon
rules:
node/no-missing-import: off
eqeqeq:
- error
- always
- "null": "ignore"
\@typescript-eslint/no-dynamic-delete: off
no-return-assign: off
no-void: off
consistent-return: off
- files: "bin/**.{js,mjs,cjs}"
extends: eslint-config-dmitmel/presets/node
rules:
"@typescript-eslint/no-unused-vars": off
no-undefined: off
- files: "bin/**.mjs"
rules:
node/no-unsupported-features/es-syntax: off
- files: "**/src/**/*.{ts,tsx,mts,cts}"
extends: eslint-config-dmitmel/rules/typescript/with-type-checking
- files: "**/*.d.ts"
rules:
no-var: off
- files: "src/**/*.{ts,tsx,mts,cts}"
parserOptions:
project: tsconfig.json
- files: "src/renderer/**/*.{ts,tsx,mts,cts}"
rules:
no-console: error
- files: "src/renderer/modules/{common,components}/*.{ts,tsx,mts,cts}"
rules:
# These files sometimes have checks that are technically unnecessary according to the typedefs,
# but should help prevent a crash in the case of an unexpected Discord change
# So we will allow them
"@typescript-eslint/no-unnecessary-condition": off