This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
137 lines (137 loc) · 4.72 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint/eslint-plugin",
"prettier",
"import"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/typescript",
"prettier"
],
"root": true,
"env": {
"node": true,
"jest": true
},
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always"
}
],
"eqeqeq": "error",
"prefer-template": "error",
"complexity": ["warn", 10],
"max-depth": ["warn", 3],
"max-statements": ["warn", 30],
"max-lines": ["warn"],
"no-console": "warn",
"no-debugger": "error",
"no-warning-comments": ["warn", { "terms": ["todo", "fixme", "hack"], "location": "anywhere" }],
"implicit-arrow-linebreak": "error",
"arrow-body-style": ["error", "as-needed"],
"func-names": ["error", "always"],
"prefer-arrow-callback": "error",
"func-style": ["error", "declaration"],
"@typescript-eslint/array-type": "error",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "no-type-imports" }],
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-confusing-non-null-assertion": ["error"],
"@typescript-eslint/no-dynamic-delete": ["error"],
"@typescript-eslint/no-empty-interface": ["error", {"allowSingleExtends": true }],
"@typescript-eslint/no-explicit-any": ["error", { "fixToUnknown": true, "ignoreRestArgs": false }],
"@typescript-eslint/prefer-for-of": ["error"],
"@typescript-eslint/prefer-function-type": ["error"],
"@typescript-eslint/prefer-includes": ["error"],
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/naming-convention": [
"warn",
{ "selector": "variableLike", "format": ["camelCase"] },
{ "selector": "method", "format": ["camelCase"] },
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "parameter", "format": ["camelCase"] }
],
"@typescript-eslint/no-floating-promises": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "@app/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": ["@app"],
"alphabetize": { "order": "asc" }
}
],
"import/newline-after-import": "error",
"import/no-default-export": "error",
"import/no-duplicates": "error",
"import/no-self-import": "error"
},
"overrides": [
{
"files": [
"test/**/*.spec.ts"
],
"plugins": [
"@typescript-eslint",
"prettier",
"import",
"jest",
"jest-formatting"
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:jest/style",
"prettier"
],
"rules": {
"@typescript-eslint/unbound-method": "off",
"jest/unbound-method": "error",
"jest/consistent-test-it": ["error", {"fn": "it"}],
"jest/max-nested-describe": ["error", { "max": 3 }],
"jest/no-duplicate-hooks": "error",
"jest/no-identical-title": "error",
"jest/no-test-return-statement": "error",
"jest/prefer-called-with": "error",
"jest/prefer-hooks-on-top": "error",
"jest/require-to-throw-message": "error",
"jest/require-top-level-describe": "error",
"jest-formatting/padding-around-after-all-blocks": 1,
"jest-formatting/padding-around-after-each-blocks": 1,
"jest-formatting/padding-around-before-all-blocks": 1,
"jest-formatting/padding-around-before-each-blocks": 1,
"jest-formatting/padding-around-describe-blocks": 1,
"jest-formatting/padding-around-test-blocks": 1
}
}
]
}