-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy patheslint.config.js
69 lines (68 loc) · 2.26 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
const eslint = require("@eslint/js");
const tslint = require("typescript-eslint");
module.exports = tslint.config(
{
files: ["src/**/*.ts"],
extends: [
eslint.configs.recommended,
...tslint.configs.strictTypeChecked
],
rules: {
"@typescript-eslint/naming-convention": [
"warn",
{
selector: ["parameter", "variable"],
leadingUnderscore: "require",
format: ["camelCase"],
modifiers: ["unused"]
},
{
selector: ["parameter", "variable"],
leadingUnderscore: "allowDouble",
format: ["camelCase", "UPPER_CASE"]
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_"
}
],
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"@typescript-eslint/no-confusing-void-expression": [
"warn",
{
ignoreArrowShorthand: true
}
],
"@typescript-eslint/no-invalid-void-type": [
"warn",
{
allowAsThisParameter: true
}
],
"@typescript-eslint/restrict-template-expressions": [
"warn",
{
allowNumber: true
}
],
"@typescript-eslint/prefer-nullish-coalescing": "error"
},
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: __dirname
}
},
ignores: [
"src/map/codec/src/util/ZoneCalculator.ts",
"src/network/protocol/packet/handshake/HandshakeResponsePacket.ts"
]
}
);