-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
125 lines (125 loc) · 3.86 KB
/
index.js
File metadata and controls
125 lines (125 loc) · 3.86 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
module.exports = {
env: {
browser: true,
es6: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "default",
format: ["camelCase"],
},
{
selector: "variable",
modifiers: ["const", "global"],
format: ["camelCase", "PascalCase"], // allow PascalCase for component names
},
{
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
},
{
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "allow",
},
{
selector: "enumMember",
format: ["PascalCase"],
},
{
selector: "typeLike",
format: ["PascalCase"],
},
{
selector: "interface",
format: ["PascalCase"],
prefix: ["I"],
},
],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-parameter-properties": "warn",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
allowExpressions: true,
},
],
curly: "warn",
"dot-notation": "off",
"eol-last": "off",
eqeqeq: ["warn", "always"],
"guard-for-in": "off",
"id-blacklist": "warn",
"id-match": "warn",
"no-bitwise": "off",
"no-caller": "warn",
"no-console": [
"warn",
{
allow: [
"dirxml",
"warn",
"error",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupCollapsed",
"groupEnd",
"table",
"Console",
"markTimeline",
"profile",
"profileEnd",
"timeline",
"timelineEnd",
"timeStamp",
"context",
],
},
],
"no-debugger": "warn",
"no-empty": "warn",
"no-eval": "warn",
"no-fallthrough": "warn",
"no-new-wrappers": "warn",
"no-redeclare": "off", // note you must disable the base rule as it can report incorrect errors (e.g. on multi-signature functions)
"@typescript-eslint/no-redeclare": ["error"],
"no-shadow": "off", // note you must disable the base rule as it can report incorrect errors (e.g. on enums)
"@typescript-eslint/no-shadow": [
"warn",
{
hoist: "all",
},
],
"no-underscore-dangle": "off",
"no-unused-expressions": "off",
"no-unused-labels": "warn",
"no-var": "warn",
"prefer-const": "warn",
radix: "warn",
"spaced-comment": ["warn", "always", { markers: ["/"] }],
},
};