-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
executable file
·47 lines (46 loc) · 1.44 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
const INLINE_ELEMENTS = require('eslint-plugin-vue/lib/utils/inline-non-void-elements.json')
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
'plugin:editorconfig/all',
'plugin:vue/vue3-recommended',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'editorconfig',
],
rules: {
'no-tabs': 0,
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'never' }],
'padded-blocks': ['error', 'never'],
'no-console': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'prefer-promise-reject-errors': 'off',
'comma-dangle': ['error', 'always-multiline'],
'no-irregular-whitespace': ['warn', { skipTemplates: true }],
'vue/multi-word-component-names': 'off',
'vue/html-indent': ['error', 4],
'vue/no-deprecated-slot-attribute': 'off',
// 'vue/singleline-html-element-content-newline':
'vue/max-attributes-per-line': [
'error',
{
singleline: 5,
multiline: 1,
},
],
'vue/singleline-html-element-content-newline': [
'error',
{
ignores: ['pre', 'textarea', 'button', 'th', 'tr', ...INLINE_ELEMENTS],
},
],
},
}