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