-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
47 lines (46 loc) · 1.21 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
/* eslint-disable @typescript-eslint/no-var-requires */
const { defineConfig } = require('eslint-define-config')
module.exports = defineConfig({
root: true,
env: {
node: true
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:vue/vue3-strongly-recommended',
'plugin:@typescript-eslint/recommended'
],
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly'
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
/*
"off" -> 0 關閉規則
"warn" -> 1 開啟警告規則
"error" -> 2 開啟錯誤規則
*/
rules: {
'vue/multi-word-component-names': 0,
'vue/require-explicit-emits': 0,
'@typescript-eslint/no-unused-vars': 0,
'eol-last': 2,
'no-console': 1,
'no-dupe-args': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-multi-spaces': 2,
'no-func-assign': 2,
'no-trailing-spaces': 2,
'no-redeclare': [2, { 'builtinGlobals': true }],
'no-multiple-empty-lines': [2, { 'max': 1, 'maxBOF': 0, 'maxEOF': 0 }],
'comma-dangle': [2, 'never'],
'object-curly-spacing': [2, 'always']
}
})