-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
79 lines (77 loc) · 2.24 KB
/
.eslintrc.cjs
File metadata and controls
79 lines (77 loc) · 2.24 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
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
module.exports = {
root : true,
env : {
browser : true,
es2021 : true,
},
extends: [
"eslint:recommended",
],
parserOptions: {
sourceType : "module",
ecmaVersion : "latest",
},
settings: {
"import/resolver": {
alias: {
map: [
["@", "./src"],
],
},
},
},
globals: {
"ARGV" : "readonly",
"Debugger" : "readonly",
"GIRepositoryGType" : "readonly",
"globalThis" : "readonly",
"imports" : "readonly",
"Intl" : "readonly",
"log" : "readonly",
"logError" : "readonly",
"print" : "readonly",
"printerr" : "readonly",
"global" : false,
"debug" : false,
"_" : false,
"_C" : false,
"_N" : false,
"ngettext" : false
},
rules: {
indent: ["error", 4],
"array-element-newline" : ["error", "consistent"],
"function-paren-newline" : ["error", "consistent"],
"space-in-parens" : ["error", "always"],
"func-names" : ["error", "as-needed"],
"semi" : ["error", "never"],
// "no-underscore-dangle": ["warn"],
"key-spacing" : ["error", {
align: {
beforeColon : true,
afterColon : true,
on : "colon",
},
}],
"no-multi-spaces" : ["error", { exceptions: { VariableDeclarator: true } }],
"quotes" : ["error", "double"],
"max-len" : ["error", { code: 150 }],
// "camelcase": ["error", {
// ignoreImports: true, ignoreDestructuring: true, properties: "never", allow: ["__"],
// }],
},
"overrides": [
{
"files": [
"webextension/**/*.js",
"src/shell/**/*.js",
"src/extension.js",
"src/prefs.js"
],
"parserOptions": {
"sourceType": "module"
}
}
],
globals: {},
}