-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
141 lines (139 loc) · 5.29 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jsdoc/recommended",
"google",
"prettier",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"rules": {
"quotes": [
"error",
"double",
{
"avoidEscape": true
}
],
"sort-imports": [
"error",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
],
"curly": 2,
"jsdoc/newline-after-description": "off",
/*
"jsdoc/require-jsdoc": [
"warn",
{
"publicOnly": true
}
],
*/
"prettier/prettier": ["error"],
"valid-jsdoc": "off", // This is deprecated but included in recommended configs.
"require-jsdoc": "off", // This rule is deprecated and superseded by jsdoc/require-jsdoc.
"no-prototype-builtins": "warn", // TODO(bkendall): remove, allow to error.
"no-restricted-globals": ["error", "name", "length"],
"no-useless-escape": "warn", // TODO(bkendall): remove, allow to error.
"prefer-const": "warn", // TODO(bkendall): remove, allow to error.
"prefer-promise-reject-errors": "warn" // TODO(bkendall): remove, allow to error.
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/await-thenable": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/ban-types": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/camelcase": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true
}
], // TODO(bkendall): SET to error.
"@typescript-eslint/no-inferrable-types": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-misused-promises": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-unnecessary-type-assertion": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-use-before-define": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-var-requires": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/prefer-includes": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/prefer-regexp-exec": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/prefer-string-starts-ends-with": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/require-await": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/unbound-method": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-explicit-any": "off", // TODO(bkendall): remove, allow to error.
"camelcase": "warn", // TODO(bkendall): remove, allow to error.
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"new-cap": "warn", // TODO(bkendall): remove, allow to error.
"no-case-declarations": "warn", // TODO(bkendall): remove, allow to error.
"no-constant-condition": "warn", // TODO(bkendall): remove, allow to error.
"no-fallthrough": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
], // TODO(bkendall): remove, allow to error.
"require-atomic-updates": "warn" // TODO(bkendall): remove, allow to error.
}
},
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/unbound-method": "off",
"no-invalid-this": "warn", // TODO(bkendall): remove, allow to error.
"no-var": "warn" // TODO(bkendall): remove, allow to error.
}
},
{
"files": ["*.spec.*", "tests/**/*.ts"],
"env": {
"mocha": true
},
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
], // TODO(bkendall): remove, allow to error.
"@typescript-eslint/no-explicit-any": "off"
}
}
],
"globals": {},
"parserOptions": {
"ecmaVersion": 2017,
"project": ["tsconfig.json"],
"sourceType": "module",
"warnOnUnsupportedTypeScriptVersion": false
},
"plugins": ["prettier", "@typescript-eslint", "jsdoc"],
"settings": {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
}
}
},
"parser": "@typescript-eslint/parser"
}