-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
78 lines (71 loc) · 1.63 KB
/
eslint.config.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
import { config, configs, parser, plugin } from "typescript-eslint";
import eslint from "@eslint/js";
import prettier from "eslint-plugin-prettier/recommended";
import tsdoc from "eslint-plugin-tsdoc";
export default config(
// Enable all ESLint rules.
eslint.configs.all,
// Disable specific rules.
{
rules: {
// Possible Problems
// N/A
// Suggestions
complexity: "off",
"id-length": "off",
"max-depth": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-nested-callbacks": "off",
"max-params": "off",
"max-statements": "off",
"no-bitwise": "off",
"no-continue": "off",
"no-div-regex": "off",
"no-inline-comments": "off",
"no-label-var": "off",
"no-labels": "off",
"no-magic-numbers": "off",
"no-nested-ternary": "off",
"no-plusplus": "off",
"no-shadow": "off", // Must use `@typescript-eslint/no-shadow` instead.
"no-ternary": "off",
"no-undef-init": "off",
"no-void": "off",
"no-warning-comments": "off",
"one-var": ["error", "never"]
// Layout and Formatting
// N/A
}
},
// Enable type checking and related rules.
...configs.strictTypeChecked,
...configs.stylisticTypeChecked,
{
languageOptions: {
parser,
parserOptions: {
ecmaVersion: "latest",
project: true,
tsconfigRootDir: "."
}
},
plugins: {
"@typescript-eslint": plugin
},
rules: {
"@typescript-eslint/no-shadow": "error"
}
},
// Enable the TSDoc plugin.
{
plugins: {
tsdoc
},
rules: {
"tsdoc/syntax": "error"
}
},
// Enable the Prettier plugin.
prettier // Includes `eslint-config-prettier` and `eslint-plugin-prettier`.
);