forked from dyc3/opentogethertube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
85 lines (81 loc) · 2.37 KB
/
.eslintrc.json
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
{
"root": true,
"env": {
"node": true,
"es6": true
},
"plugins": ["prettier", "promise"],
"extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:promise/recommended"],
"rules": {
// for prettier compat
"implicit-arrow-linebreak": "off",
"no-console": "error",
"no-debugger": "error",
"curly": ["error", "all"],
"no-eval": ["error", {}],
"no-multiple-empty-lines": ["error", { "max": 1, "maxBOF": 0 }],
"no-var": "error",
"no-dupe-keys": "error",
"no-prototype-builtins": "error",
"prefer-arrow-callback": "error",
"eol-last": ["error", "always"],
"eqeqeq": ["error", "always"],
"no-unused-vars": "error",
"@typescript-eslint/no-var-requires": "warn",
"promise/prefer-await-to-then": "error"
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "off"
}
},
{
"files": ["*.vue"],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module"
},
"extends": ["plugin:vue/base", "plugin:vue/essential", "@vue/typescript/recommended"],
"rules": {
// HACK: this rule is required, otherwise travis-ci will fail (for some reason)
// even through when run locally, no linting errors occur.
"vue/no-parsing-error": [
"error",
{
"invalid-first-character-of-tag-name": false
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unsafe-call": "off", // TODO: switch to warn
"@typescript-eslint/no-unsafe-member-access": "off", // TODO: switch to warn
"@typescript-eslint/no-unsafe-assignment": "off" // TODO: switch to warn
}
}
]
}