-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
94 lines (79 loc) · 2 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import eslintConfigPrettier from "eslint-config-prettier"
import noOnlyTests from "eslint-plugin-no-only-tests"
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
export default tseslint.config(
{
ignores: [
"**/vite.config.js",
"**/cypress.config.ts",
"**/test-environment/",
"eslint.config.mjs",
"dist/",
"integration-tests/cypress/support/tui-sandbox.ts",
],
},
eslint.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.strictTypeChecked,
{
plugins: {
"no-only-tests": noOnlyTests,
},
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
project: true,
},
},
rules: {
"no-only-tests/no-only-tests": "error",
"@typescript-eslint/require-await": "off",
"no-restricted-syntax": [
"error",
{
selector: "TSEnumDeclaration",
message: "Don't declare enums",
},
],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
allowBoolean: true,
},
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/explicit-module-boundary-types": ["warn"],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"lines-between-class-members": [
"error",
"always",
{
exceptAfterSingleLine: true,
},
],
"no-empty-function": [
"error",
{
allow: ["constructors"],
},
],
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"no-useless-constructor": "off",
"no-void": [
"error",
{
allowAsStatement: true,
},
],
"@typescript-eslint/no-unused-vars": "off",
},
},
// should be the last item
eslintConfigPrettier,
)