forked from firebase/firebase-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
91 lines (91 loc) · 4.66 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
"env": {
"es6": true,
"node": true,
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"google",
"prettier",
"prettier/@typescript-eslint",
],
"rules": {
"prettier/prettier": "error",
"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.
"require-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
"valid-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@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-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.
"camelcase": "warn", // TODO(bkendall): remove, allow to error.
"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.
"no-unused-vars": "warn", // 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.*"],
"env": {
"mocha": true,
},
"rules": {
"require-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
},
},
],
"globals": {},
"parserOptions": {
"ecmaVersion": "2017",
"project": ["tsconfig.json", "tsconfig.dev.json"],
"sourceType": "module",
},
"plugins": [
"prettier",
"@typescript-eslint",
],
"parser": "@typescript-eslint/parser",
};