forked from TypeStrong/typedoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
88 lines (79 loc) · 2.74 KB
/
.eslintrc
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"env": {
"node": true,
"es6": true
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": [
"src/test/renderer/specs",
"dist",
"docs",
"tmp",
"coverage",
"static/main.js",
"src/lib/output/themes/default/assets",
"node_modules",
// Would be nice to lint these, but they shouldn't be included in the project,
// so we need a second eslint config file.
"example",
"src/test/converter",
"src/test/converter2",
"src/test/module",
"src/test/packages",
"src/test/renderer",
"src/test/slow/entry-points",
"scripts",
"bin"
],
"rules": {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
// This one is just annoying since it complains at incomplete code
"no-empty": "off",
// This rule is factually incorrect. Interfaces which extend some type alias can be used to introduce
// new type names. This is useful particularly when dealing with mixins.
"@typescript-eslint/no-empty-interface": "off",
// We still use `any` fairly frequently...
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
// Really annoying, doesn't provide any value.
"@typescript-eslint/no-empty-function": "off",
// Declaration merging with a namespace is a necessary tool when working with enums.
"@typescript-eslint/no-namespace": "off",
// Reported by TypeScript
"@typescript-eslint/no-unused-vars": "off",
"no-console": "warn",
// Feel free to turn one of these back on and submit a PR!
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-syntax": [
"warn",
{
"selector": "ImportDeclaration[source.value=/.*perf$/]",
"message": "Benchmark calls must be removed before committing."
},
{
"selector": "MemberExpression[object.name=type][property.name=symbol]",
"message": "Use type.getSymbol() instead, Type.symbol is not properly typed."
}
]
},
"overrides": [
{
"files": ["src/test/**"],
"env": {
"mocha": true
}
}
]
}