-
Notifications
You must be signed in to change notification settings - Fork 110
/
.eslintrc.json
69 lines (69 loc) · 2.07 KB
/
.eslintrc.json
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
{
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"process": true
},
"env": {
"browser": true
},
"rules": {
"curly": ["error", "multi-line"], // if statements without curly are evil
"no-console": ["error", { "allow": ["info", "warn", "error"] }], // do not leave console.log
"require-atomic-updates": ["off"], // the rule is kinda buggy
"@typescript-eslint/no-unnecessary-type-assertion": ["error"], // we don't need unnecessary type assertions
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "memberLike",
"modifiers": ["public"],
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "forbid"
},
{
"selector": "memberLike",
"modifiers": ["protected"],
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "require"
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "require"
},
{
"selector": "enumMember",
"format": ["PascalCase"]
},
{
"selector": "import",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], // we sometimes have to define unused arguments
"@typescript-eslint/no-explicit-any": ["off"], // Three.js sometimes forces us to deal with anys
"@typescript-eslint/no-non-null-assertion": ["off"] // Three.js sometimes forces us to deal with bangs
}
}