forked from danger/danger-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
66 lines (60 loc) · 2.24 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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.spec.json",
sourceType: "module",
},
plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
rules: {
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-unused-expressions": "error",
// Something is grumpy about these rules re: node imports - TODO
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off",
curly: "error",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "off",
"jsdoc/newline-after-description": "off",
"no-empty": "error",
// This is used intentionally in a bunch of ci_source/providers
"no-empty-function": "off",
"no-redeclare": "error",
"no-var": "error",
// There are a bunch of existing uses of 'let' where this rule would trigger
"prefer-const": "off",
// This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
"@typescript-eslint/no-inferrable-types": "off",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
// Allow function args to be unused
args: "none",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "off",
"jest/valid-expect": "error",
"@typescript-eslint/no-non-null-assertion": "off",
// Tons of violations in the codebase
"@typescript-eslint/naming-convention": "off",
// Used liberally in the codebase
"@typescript-eslint/no-explicit-any": "off",
// This has value in communicating with other Developers even if it has no functional effect.
"@typescript-eslint/no-empty-interface": "off",
},
}