-
Notifications
You must be signed in to change notification settings - Fork 83
/
.eslintrc.js
70 lines (69 loc) · 2.58 KB
/
.eslintrc.js
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
module.exports = {
root: true,
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:jsdoc/recommended",
"google",
"plugin:prettier/recommended",
],
env: {
es6: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaVersion: "ES2020",
project: ["tsconfig.json", "tsconfig.dev.json"],
},
plugins: ["@typescript-eslint", "jsdoc"],
rules: {
"jsdoc/newline-after-description": "off",
"jsdoc/require-jsdoc": ["warn", { publicOnly: true }],
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"require-atomic-updates": "off", // This rule is so noisy and isn't useful: https://github.com/eslint/eslint/issues/11899
"require-jsdoc": "off", // This rule is deprecated and superseded by jsdoc/require-jsdoc.
"valid-jsdoc": "off", // This is deprecated but included in recommended configs.
},
overrides: [
{
files: ["*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-argument": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-assignment": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-call": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-member-access": "warn", // TODO(bkendall): remove allow to error.
},
},
{
files: ["*.js"],
rules: {
"@typescript-eslint/no-this-alias": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-argument": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-assignment": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-call": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-member-access": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-unsafe-return": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/no-var-requires": "warn", // TODO(bkendall): remove allow to error.
"@typescript-eslint/unbound-method": "warn", // TODO(bkendall): remove allow to error.
},
},
{
files: ["*.spec.*"],
env: {
mocha: true,
},
},
],
settings: {
jsdoc: {
tagNamePreference: {
returns: "return",
},
},
},
};