-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue3.js
40 lines (37 loc) · 964 Bytes
/
vue3.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
// Requires vue eslint plugin:
// vue add @vue/cli-plugin-eslint
// or
// yarn add -D eslint eslint-plugin-vue
const config = require('./index.js');
const {vue} = require('./rulesets.js');
const {vue3Globals} = require('./globals.js');
// Remove deprecated rule and replace with new one
const {'vue/v-on-function-call': onFnCall, ...vue2} = vue;
const vue3 = {
'vue/v-on-handler-style': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'vue/no-v-html': 'off',
'vue/no-v-text-v-html-on-component': 'off',
'vue/require-default-prop': 'warn',
'vue/no-mutating-props': ['warn', {shallowOnly: true}],
};
Object.assign(config.rules, vue2, vue3);
module.exports = Object.assign(config, {
extends: [
'plugin:vue/vue3-essential',
],
plugins: [
'vue',
],
overrides: [
{
files: '**/*.{vue,js,mjs,ts}',
globals: vue3Globals,
},
],
env: {
node: true,
es6: true,
},
});