-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.cjs
40 lines (40 loc) · 965 Bytes
/
.eslintrc.cjs
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
module.exports = {
env: {
node: true,
browser: true,
es2021: true, // es 变量
},
extends: [
`eslint:recommended`, // 继承 eslint 的核心推荐规则
],
parserOptions: {
sourceType: `module`,
ecmaVersion: 2022, // es 语法
},
ignorePatterns: [`dist`, `win-api/res`, `script/npm-pkg/browser`, `script/npm-pkg/node`],
globals: {
Neutralino: `writeable`,
chrome: `writeable`,
},
rules: {
"no-var": `error`,
"spaced-comment": `error`,
"eol-last": [`error`, `always`],
"linebreak-style":[`error`, `unix`],
"no-multiple-empty-lines":[`error`, { "max": 2, "maxEOF": 0 }],
"no-trailing-spaces": `error`,
"comma-dangle": [`error`, `always-multiline`],
"semi": [
`error`,
`never`,
],
"quotes": [
`error`,
`backtick`,
],
"no-unused-vars": `off`,
"no-console": `off`,
"no-debugger": `off`,
"no-async-promise-executor": [`off`],
},
}