-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
50 lines (50 loc) · 1.37 KB
/
.eslintrc.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
module.exports = {
extends: ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier"],
env: {
browser: true,
es6: true,
mocha: true,
},
plugins: ["@typescript-eslint", "react"],
rules: {
"@typescript-eslint/ban-types": ["warn"],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "default",
format: ["camelCase", "PascalCase"],
},
{
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
},
{
selector: "property",
format: ["camelCase", "UPPER_CASE"],
},
{
selector: "typeLike",
format: ["PascalCase"],
},
{
selector: "enumMember",
format: ["UPPER_CASE"],
},
{
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
},
],
"@typescript-eslint/indent": ["off"],
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-inferrable-types": ["warn"],
"@typescript-eslint/no-this-alias": ["warn"],
"prefer-const": ["warn"],
"prefer-spread": ["warn"],
"no-var": ["warn"],
// note you must disable the base rule as it can report incorrect errors
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
};