forked from sensejs/sensejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
101 lines (97 loc) · 3.45 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"no-empty-function": "off",
"quotes": "off",
"semi": "off",
"no-undef": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/one-variable-per-declaration": "off",
"@typescript-eslint/object-literal-sort-keys": "off",
"@typescript-eslint/trailing-comma": "off",
"@typescript-eslint/callable-types": "off",
"@typescript-eslint/quotes": ["error", "single"],
"@typescript-eslint/max-classes-per-file": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-unnecessary-initializer": ["off"],
"@typescript-eslint/member-ordering": ["error", {
"default": [
// Index signature
// Fields
"static-field", // = ['public-static-field', 'protected-static-field', 'private-static-field'])
"abstract-field", // = ['public-abstract-field', 'protected-abstract-field', 'private-abstract-field'])
"instance-field", // = ['public-instance-field', 'protected-instance-field', 'private-instance-field'])
// Constructors
"constructor", // = ['public-constructor', 'protected-constructor', 'private-constructor'])
// Methods
"static-method", // = ['public-static-method', 'protected-static-method', 'private-static-method'])
"abstract-method", // = ['public-abstract-method', 'protected-abstract-method', 'private-abstract-method'])
"instance-method" // = ['public-instance-method', 'protected-instance-method', 'private-instance-method'])
]
}],
// no-use-before-define seems to be buggy,
"@typescript-eslint/no-use-before-define": ["warn", {
"functions": false
}],
"@typescript-eslint/member-access": "off",
"@typescript-eslint/default-param-last": ["error"],
"@typescript-eslint/array-type": ["error"],
"@typescript-eslint/interface-name": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": ["error",
{
"types": {
"String": "use 'string' instead",
"Number": "use 'number' instead",
"Object": "use 'object' or '{}' instead"
},
"extendDefaults": false
}
],
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/naming-convention": ["error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
},
{
"selector": "function",
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": "parameter",
"format": ["camelCase"]
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"modifiers": ["static", "private"],
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}]
}
}