forked from oliverschwendener/ueli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
49 lines (45 loc) · 1.86 KB
/
eslint.config.mjs
File metadata and controls
49 lines (45 loc) · 1.86 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
import eslint from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
export default [
...tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended),
{
ignores: ["dist-main/", "dist-preload/", "dist-renderer/", "node_modules/", "**/coverage/"],
},
{
rules: {
curly: ["error"],
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "none" }],
"@typescript-eslint/consistent-type-imports": "error",
"func-style": ["error", "expression"],
/**
* Prevents empty constructors, e.g.: `constructor() {}`.
*/
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
/**
* Enforces explicit class-member accessibility.
*/
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "explicit" }],
"padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "*", next: "if" },
{ blankLine: "always", prev: "if", next: "*" },
{ blankLine: "always", prev: "*", next: "for" },
{ blankLine: "always", prev: "for", next: "*" },
{ blankLine: "always", prev: "*", next: "try" },
{ blankLine: "always", prev: "try", next: "*" },
{ blankLine: "always", prev: "*", next: "while" },
{ blankLine: "always", prev: "while", next: "*" },
{ blankLine: "always", prev: "*", next: "switch" },
{ blankLine: "always", prev: "switch", next: "*" },
],
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
];