-
-
Notifications
You must be signed in to change notification settings - Fork 243
/
eslint.config.mjs
30 lines (28 loc) · 960 Bytes
/
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
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",
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
];