-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.json
More file actions
80 lines (79 loc) · 2.54 KB
/
.eslintrc.json
File metadata and controls
80 lines (79 loc) · 2.54 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
{
"env": {
"browser": true,
"es2020": true,
"node": true,
"worker": true
},
"extends": [
"eslint:recommended",
"@typescript-eslint/recommended",
"@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": false
}
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/prefer-const": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-misused-promises": "error",
// General ESLint rules
"no-console": "off",
"no-debugger": "warn",
"no-duplicate-imports": "error",
"no-unused-expressions": "error",
"prefer-const": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-template": "error",
"prefer-arrow-callback": "error",
"arrow-spacing": "error",
"no-trailing-spaces": "error",
"eol-last": "error",
"comma-dangle": ["error", "never"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"indent": ["error", 2, { "SwitchCase": 1 }],
"max-len": ["warn", { "code": 120, "ignoreUrls": true, "ignoreStrings": true }],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"comma-spacing": ["error", { "before": false, "after": true }],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"space-before-blocks": "error",
"space-before-function-paren": ["error", { "anonymous": "always", "named": "never", "asyncArrow": "always" }],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"keyword-spacing": "error"
},
"ignorePatterns": [
"dist",
"node_modules",
"rollup.config.js",
"*.d.ts"
]
}