-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
91 lines (91 loc) · 3.78 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
{
"env": { "browser": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict-type-checked",
"prettier",
"plugin:unicorn/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": [ "tsconfig.json" ], "ecmaVersion": "latest", "sourceType": "module" },
"plugins": [
"@typescript-eslint",
"import",
"unicorn",
"prettier"
],
"rules": {
"@typescript-eslint/no-this-alias": [ "off" ], // Bans `that = this`
"@typescript-eslint/ban-ts-comment": [ "error" ], // Allows ts-ignore, etc
"@typescript-eslint/explicit-module-boundary-types": [ "off" ], // Allows inferred return types
"camelcase": [ "off" ], // Allow non-camcelcase variable names
"no-console": [ "error", { "allow": [ "warn", "error" ] } ], // Use console.log for temporary debugging that you want to be reminded to remove later
"no-empty": [ "error", { "allowEmptyCatch": true } ], // No empty functions
"class-methods-use-this": [ "error" ], // Class methods must use `this`
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true, // Allow unused vars declared in an object destructuring
"argsIgnorePattern": "^_", // Ignore args prefixed with _
"varsIgnorePattern": "^_" // Ignore vars prefixed with _
}
],
"@typescript-eslint/no-explicit-any": [ "off" ], // Allow any
"@typescript-eslint/no-non-null-assertion": [ "off" ], // Allow ! assertion
"no-constant-condition": [ "error" ], // if (false)...
"no-prototype-builtins": [ "off" ],
"no-debugger": [ "error" ],
"no-self-assign": [ "error" ],
"no-self-compare": [ "error" ],
"no-template-curly-in-string": [ "error" ],
"require-atomic-updates": [ "error" ],
"valid-typeof": [ "error" ],
"complexity": [ "error" ],
"dot-notation": [ "error" ],
"eqeqeq": [ "error" ],
"max-depth": [ "error", 4 ],
"max-nested-callbacks": [ "error", 5 ],
"max-params": [ "error", 4 ],
"no-bitwise": [ "error" ],
"no-extra-boolean-cast": [ "error" ],
"no-implicit-coercion": [ "error" ],
"no-lone-blocks": [ "error" ],
"no-lonely-if": [ "error" ],
"no-param-reassign": [ "error" ],
"require-await": [ "error" ],
"no-unneeded-ternary": [ "error" ],
"no-irregular-whitespace": [ "error" ],
"prettier/prettier": [ "error" ], // Flags prettier errors
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
[ "parent", "sibling" ],
"type"
],
"newlines-between": "always"
}
],
"@typescript-eslint/no-floating-promises": [ "off" ],
"@typescript-eslint/no-confusing-void-expression": [ "off" ],
"@typescript-eslint/no-misused-promises": [ "off" ],
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ "allowConstantLoopConditions": true }
],
"unicorn/prevent-abbreviations": [ "off" ],
"unicorn/new-for-builtins": [ "off" ],
"unicorn/no-null": [ "off" ],
"unicorn/filename-case": [ "off" ],
"unicorn/catch-error-name": [ "off" ],
"unicorn/switch-case-braces": [ "off" ],
"unicorn/prefer-set-has": [ "off" ],
"unicorn/no-array-callback-reference": [ "off" ],
"unicorn/no-useless-undefined": [ "off" ]
}
}