-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.json
90 lines (90 loc) · 1.73 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
{
"env": {
"es6": true,
"node": true
},
"extends": [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
// NOTE: This needs to be last, per documentation:
// https://github.com/prettier/eslint-plugin-prettier?tab=readme-ov-file#configuration-legacy-eslintrc
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"filename-rules",
"prettier"
],
"rules": {
"filename-rules/match": [
2,
"kebab-case"
],
"no-unused-vars": "warn",
"no-constant-condition": "warn",
"no-empty": "warn",
"consistent-return": "error",
"@typescript-eslint/no-empty-function": "warn",
"prettier/prettier": [
"error",
{
"singleQuote": true
},
{
"trailingComma": "none"
}
],
"prefer-const": "off",
// NOTE: We can't enable TS compilation to enforce function return types
// Source: https://github.com/Microsoft/TypeScript/issues/18529
// So instead we enforce it with linting
"@typescript-eslint/explicit-function-return-type": "error",
"object-curly-spacing": [
"error",
"always"
],
"@typescript-eslint/padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
],
"next": "*"
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
}
],
"lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
]
}
}