-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
82 lines (82 loc) · 1.91 KB
/
.eslintrc.js
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
module.exports = {
overrides: [
{
files: [
"js/widget.js",
"js/util.js",
"js/settings.js",
"js/backend.js",
"js/translator.js",
"test/util.test.js",
],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
ecmaFeatures: {
impliedStrict: true,
},
env: {
browser: true,
es2022: true,
jest: true,
},
extends: ["eslint:recommended"],
rules: {
semi: "error",
indent: ["error", 2],
"no-multi-spaces": "error",
"space-in-parens": "error",
"no-multiple-empty-lines": "error",
"prefer-const": "error",
"no-use-before-define": "error",
"no-console": "error",
curly: "error",
"no-undef-init": "error",
"init-declarations": ["error", "always"],
quotes: ["error", "backtick"],
},
},
{
files: [
"build/version-update.js",
"build/version-check.js",
"build/notarize.js",
"js/auto-update.js",
"js/logger.js",
"js/preload.js",
"main.js",
],
parserOptions: {
ecmaVersion: 2022,
},
ecmaFeatures: {
impliedStrict: true,
},
env: {
browser: true,
node: true,
es2022: true,
},
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
],
rules: {
semi: "error",
indent: ["error", 2],
"no-multi-spaces": "error",
"space-in-parens": "error",
"no-multiple-empty-lines": "error",
"prefer-const": "error",
"no-use-before-define": "error",
"no-console": "error",
curly: "error",
"no-undef-init": "error",
"init-declarations": ["error", "always"],
quotes: ["error", "backtick"],
},
},
],
};