forked from podman-desktop/podman-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
102 lines (101 loc) · 3.11 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
{
"root": true,
"env": {
"es2021": true,
"node": true,
"browser": false
},
"extends": [
"eslint:recommended",
/** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:etc/recommended",
"plugin:sonarjs/recommended",
"plugin:svelte/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"extraFileExtensions": [".svelte"],
"warnOnUnsupportedTypeScriptVersion": false,
"project": [
"packages/*/tsconfig.json",
"./website/tsconfig.json",
"./extensions/*/tsconfig.json",
"./tests/tsconfig.json",
"./tools/tsconfig.json"
]
},
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
}
}
],
"settings": {
"import/resolver": {
"typescript": true,
"node": true,
"eslint-import-resolver-custom-alias": {
"alias": {
"/@": "./src",
"/@gen": "./src-generated"
},
"extensions": [".ts"],
"packages": ["packages/*", "extensions/*"]
}
}
},
"plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined"],
"ignorePatterns": [
"packages/preload/exposedInMainWorld.d.ts",
"packages/preload-docker-extension/exposedInDockerExtension.d.ts",
"node_modules/**",
"**/dist/**"
],
"rules": {
"eqeqeq": "error",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"prefer-promise-reject-errors": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/prefer-optional-chain": "error",
/**
* Having a semicolon helps the optimizer interpret your code correctly.
* This avoids rare errors in optimized code.
* @see https://twitter.com/alex_kozack/status/1364210394328408066
*/
"semi": ["error", "always"],
/**
* This will make the history of changes in the hit a little cleaner
*/
"comma-dangle": ["warn", "always-multiline"],
/**
* Just for beauty
*/
"quotes": ["warn", "single"],
"import/no-duplicates": "error",
"import/no-unresolved": "off",
"import/default": "off",
"import/no-named-as-default-member": "off",
"import/no-named-as-default": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-empty-collection": "off",
"sonarjs/no-small-switch": "off",
"etc/no-commented-out-code": "error",
"etc/no-deprecated": "off",
"redundant-undefined/redundant-undefined": "error",
"import/no-extraneous-dependencies": "error"
}
}