-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
36 lines (33 loc) · 1.31 KB
/
.eslintrc
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"ignorePatterns": ["out", "dist", "**/*.d.ts"],
"rules": {
"no-console": "off", // 禁用 console
"no-debugger": "off", // 禁用 debugger
"no-alert": "off", // 禁用 alert
// indent: ['error', 2, { SwitchCase: 1 }], // 强制使用两个空格作为缩进
"quotes": ["error", "single"], //强制使用单引号
"semi": ["error", "never"], //强制不使用分号结尾
"comma-dangle": ["error", "always-multiline"], // 逗号结束
"no-param-reassign": "error", // 禁止对 function 的参数进行重新赋值
"prettier/prettier": "error", // prettier
"prefer-rest-params": 0,
// 'prefer-const': 0,
// '@typescript-eslint/no-unused-vars': 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-explicit-any": 0, // 禁用 any 类型
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-empty-function": 0
}
}