forked from James-Yu/LaTeX-Workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
105 lines (105 loc) · 4.13 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"project": "./tsconfig.eslint.json"
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {"delimiter": "comma", "requireLast": false},
"singleline": {"delimiter": "comma", "requireLast": false}
}],
"@typescript-eslint/naming-convention": ["error",
{
"selector": "default",
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
},
{
"selector": "method",
"format": ["camelCase"]
},
{
"selector": "function",
"format": ["camelCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/semi": ["error", "never", { "beforeStatementContinuationChars": "always" }],
"@typescript-eslint/type-annotation-spacing": ["error", { "before": false, "after": true, "overrides": { "arrow": { "before": true, "after": true }}}],
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }],
"@typescript-eslint/no-misused-promises": [ "error", { "checksVoidReturn": false } ],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/prefer-readonly": "error",
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"require-await": "off",
"@typescript-eslint/require-await": "error",
"curly": "error",
"default-case": "error",
"eol-last": "error",
"eqeqeq": ["error", "always"],
"func-call-spacing": ["error", "never"],
"no-caller": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-eval": "error",
"no-invalid-this": "error",
"no-multiple-empty-lines": "error",
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"no-new-wrappers": "error",
"no-trailing-spaces": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"object-shorthand": "error",
"one-var": ["error", { "initialized": "never", "uninitialized": "never" }],
"prefer-arrow-callback": [ "error", { "allowUnboundThis": false } ],
"quotes": ["error", "single", {"avoidEscape": true}],
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]
},
"overrides": [
{
"files": ["viewer/**/*.ts"],
"extends": [
"plugin:import/errors",
"plugin:import/warnings"
],
"parserOptions": {
"ecmaVersion": 2018,
"project": "./tsconfig.eslint.viewer.json"
},
"rules": {
"@typescript-eslint/naming-convention": ["error", { "selector": "interface", "prefix": ["I"], "format": ["PascalCase"] }],
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"import/no-unresolved": "off",
"import/extensions": ["error", "always"]
}
}
]
}