-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
64 lines (64 loc) · 1.61 KB
/
.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'./.eslintrc-auto-import.json', // `unplugin-auto-import` 生成的規則設定
'eslint:recommended',
'plugin:vue/vue3-essential',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
rules: {
'vue/multi-word-component-names': 'off',
'vue/component-name-in-template-casing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-console': 'off',
'brace-style': 'off',
'operator-linebreak': 'off',
'vue/operator-linebreak': 'off',
'require-await': 'off',
'vue/html-indent': 'off',
},
},
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: '@typescript-eslint/parser',
},
plugins: ['@typescript-eslint', 'vue', 'prettier'],
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-unused-vars': 'off', // 關閉警告(warning):不允許未用變數
'@typescript-eslint/ban-types': [
// 關閉錯誤(error):不要以 {} 當作一個類型
'error',
{
extendDefaults: true,
types: {
'{}': false,
Function: false,
},
},
],
'@typescript-eslint/no-explicit-any': ['off'], // 關閉警告(warning):不允許使用 any
'@typescript-eslint/no-unused-vars': 'off', // 關閉警告(warning):不允許未用變數
'prettier/prettier': 0,
'no-empty': 0,
},
};