-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.ts
More file actions
59 lines (58 loc) · 2.26 KB
/
Copy patheslint.config.ts
File metadata and controls
59 lines (58 loc) · 2.26 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
import eslint from "@eslint/js";
import pluginLingui from "eslint-plugin-lingui";
import sonarjs from "eslint-plugin-sonarjs";
import { defineConfig, globalIgnores } from "eslint/config";
import tseslint from "typescript-eslint";
export default defineConfig([
{
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
pluginLingui.configs["flat/recommended"],
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
sonarjs.configs.recommended,
],
rules: {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-unused-expressions": "warn",
"no-magic-numbers": [
"error",
{
ignore: [0, 1, 2, 3, 4, 5, -1, -2, -3, -4, -5],
ignoreArrayIndexes: true,
enforceConst: true,
detectObjects: true,
},
],
"sonarjs/cognitive-complexity": ["error", 25],
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/prefer-literal-enum-member": "off",
},
},
globalIgnores([
"src-tauri/target",
"src/dist",
"node_modules",
"vite.config.ts",
"eslint.config.ts",
]),
]);