-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
78 lines (77 loc) · 2.91 KB
/
eslint.config.mjs
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
import js from "@eslint/js";
import parser from "@typescript-eslint/parser";
import plugin from "@typescript-eslint/eslint-plugin";
import stylisticJs from "@stylistic/eslint-plugin-js";
import globals from "globals";
export default [
js.configs.recommended,
{
"files": ["**/*.ts"],
"languageOptions": {
"parser": parser,
"ecmaVersion": "latest",
"sourceType": "module",
"parserOptions": {
"project": "./tsconfig.json"
},
"globals": {
...globals.node,
...globals.es2021,
}
},
"plugins": {
"@typescript-eslint": plugin,
"@stylistic/js": stylisticJs
},
"rules": {
"indent": ["error", 4, { "SwitchCase": 1 }],
"max-nested-callbacks": ["error", { "max": 4 }],
"no-empty-function": ["error", { "allow": ["constructors"] }],
"no-explicit-any": "off",
"no-implicit-coercion": "error",
"no-lonely-if": "error",
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-multi-assign": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-shadow": "error",
"no-template-curly-in-string": "error",
"no-undef": "off",
"no-useless-return": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-unused-vars": "off",
"quotes": ["error", "double"],
"semi": ["error", "always"],
"yoda": "error",
"@stylistic/js/max-len": ["error", { "code": 150, "ignoreStrings": true, "ignoreTemplateLiterals": true, "ignoreComments": true }],
"@stylistic/js/no-trailing-spaces": "error",
"@stylistic/js/object-curly-spacing": ["error", "always"],
"@stylistic/js/linebreak-style": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"format": [
"camelCase",
"UPPER_CASE"
],
"selector": [
"function",
"variable",
"parameter",
"classProperty",
"classMethod"
],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unused-vars": "off",
}
}
]