forked from microsoft/DefinitelyTyped-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
92 lines (85 loc) · 3.03 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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"ecmaVersion": 6,
"sourceType": "module"
},
"env": {
"browser": false,
"node": true,
"es6": true
},
"plugins": [
"@typescript-eslint", "jsdoc", "import"
],
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"camelcase": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": { "regex": "^I[A-Z0-9]", "match": false } },
{
"selector": "class",
"format": ["PascalCase"]
},
{
"selector": ["variable", "function", "method", "accessor"],
"format": ["camelCase"],
"filter": {
"regex": "Reader|DEFAULT_CRASH_RECOVERY_MAX_OLD_SPACE_SIZE|DEFAULT_CHILD_RESTART_TASK_INTERVAL",
"match": false
}
},
{
"selector": ["parameter"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-this-alias": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unified-signatures": "error",
// eslint-plugin-import
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
// eslint-plugin-jsdoc
"jsdoc/check-alignment": "error",
// eslint
"constructor-super": "error",
"dot-notation": "error",
"eqeqeq": "error",
"no-caller": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-fallthrough": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-return-await": "error",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-const": "error",
"prefer-object-spread": "error",
"use-isnan": "error"
}
}