-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
53 lines (53 loc) · 1.39 KB
/
.eslintrc.js
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
module.exports = {
root: true,
env: {
node: true,
browser: true,
// The Follow config only works with eslint-plugin-vue v8.0.0+
'vue/setup-compiler-macros': true,
},
extends: [
'eslint:recommended', // this maybe causes errors in defineEmits<{}>() ???
// 'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
// 'plugin:prettier-vue/recommended',
'prettier',
],
/* globals: {
defineEmits: 'readonly',
defineProps: 'readonly',
}, */
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
// plugins: ['@typescript-eslint'], // might not be needed
rules: {
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-self-closing': 'off',
'vue/require-prop-types': 'off',
'vue/first-attribute-linebreak': [
'error',
{
singleline: 'beside',
multiline: 'below',
},
],
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 20,
},
multiline: {
max: 1,
},
},
],
},
}