-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
72 lines (72 loc) · 2.13 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/eslint-recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2021,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [
'./tsconfig.json',
'./tsconfig.eslint.json'
],
extraFileExtensions: ['.svelte'],
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
],
plugins: [
'@typescript-eslint',
'prettier'
],
env: {
es6: true,
browser: true,
node: true
},
rules: {
// https://github.com/typescript-eslint/typescript-eslint/issues/2621
"no-unused-vars": "off",
'@typescript-eslint/no-unused-vars': [
"error",
{
"args": "none",
"vars": "all",
"varsIgnorePattern": "^_",
}
],
'prettier/prettier': 'error',
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false
}
],
// so I can do `while (true)`
'no-constant-condition': 'off',
// treats <script> tags as functions or something and complains
// all functions are inner-ly declared
'no-inner-declarations': 'off',
// caught by other stuff and is too sensitive (e.g. `App`)
'no-undef': 'off',
// doesn't like namespaces for some reason
// (see this: https://stackoverflow.com/questions/58270901)
"@typescript-eslint/no-namespace": "off",
// just kinda useful sometimes
"@typescript-eslint/no-empty-function": "off",
},
};