-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
94 lines (94 loc) · 2.35 KB
/
.eslintrc
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
{
"env": {
"commonjs": true,
"es6": true,
"jest": true,
"mocha": true
},
"extends": ["plugin:prettier/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"overrides": [
{
"files": ["scripts/*", "test/**/*.ts"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
// Typescript
"@typescript-eslint/ban-ts-comment": [0, { "ts-expect-error": false }],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": ["error"],
// Import
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/*.test.ts", "**/*.spec.ts"] }
],
// General
"camelcase": "warn",
"linebreak-style": ["error", "unix"],
"lines-between-class-members": [
"error",
"always",
{ "exceptAfterSingleLine": true }
],
"no-console": [
"warn",
{ "allow": ["warn", "error", "info", "group", "groupEnd"] }
],
"no-irregular-whitespace": "error",
"no-nested-ternary": "off",
"no-param-reassign": ["error", { "props": false }],
"no-plusplus": 0,
"no-use-before-define": "off",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"next": "*",
"prev": ["const", "let", "var", "block-like", "if"]
},
{
"blankLine": "always",
"next": ["return", "const", "let", "var", "block-like", "if"],
"prev": "*"
},
{
"blankLine": "any",
"next": ["const", "let", "var"],
"prev": ["const", "let", "var"]
}
],
"quotes": ["error", "single", { "avoidEscape": true }]
},
"settings": {
"import/extensions": [".js", ".ts", ".mjs", ".jsx", ".tsx"],
"import/resolver": {
"node": {
"extensions": [".js", ".ts", ".jsx", ".tsx", ".json"]
},
// This loads tsconfig.json to ESLint but,
// ESLint's VSCode extension might have delays for caching it
"typescript": {
"alwaysTryTypes": true
}
}
}
}