Upgrade eslint-plugin-vue and fix rules

This commit is contained in:
Pavel Djundik 2020-09-30 17:44:07 +03:00
parent 02357ab9de
commit 1c004cbd17
8 changed files with 25 additions and 16 deletions

View file

@ -55,8 +55,16 @@ rules:
spaced-comment: [error, always] spaced-comment: [error, always]
strict: off strict: off
yoda: error yoda: error
vue/require-default-prop: off vue/component-tags-order:
- error
- order:
- template
- style
- script
vue/no-mutating-props: off
vue/no-v-html: off vue/no-v-html: off
vue/require-default-prop: off
vue/v-slot-style: [error, longform]
plugins: plugins:
- vue - vue

View file

@ -5,7 +5,7 @@
method="post" method="post"
action="" action=""
autocomplete="off" autocomplete="off"
@keydown.esc.prevent="$emit('toggleJoinChannel')" @keydown.esc.prevent="$emit('toggle-join-channel')"
@submit.prevent="onSubmit" @submit.prevent="onSubmit"
> >
<input <input
@ -81,7 +81,7 @@ export default {
this.inputChannel = ""; this.inputChannel = "";
this.inputPassword = ""; this.inputPassword = "";
this.$emit("toggleJoinChannel"); this.$emit("toggle-join-channel");
}, },
}, },
}; };

View file

@ -22,7 +22,7 @@ export default {
onClick() { onClick() {
this.link.shown = !this.link.shown; this.link.shown = !this.link.shown;
this.$parent.$emit("linkPreviewToggle", this.link, this.$parent.message); this.$parent.$emit("toggle-link-preview", this.link, this.$parent.message);
}, },
}, },
}; };

View file

@ -47,7 +47,7 @@
:message="message" :message="message"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
:is-previous-source="isPreviousSource(message, id)" :is-previous-source="isPreviousSource(message, id)"
@linkPreviewToggle="onLinkPreviewToggle" @toggle-link-preview="onLinkPreviewToggle"
/> />
</template> </template>
</div> </div>

View file

@ -82,13 +82,13 @@
$store.state.activeChannel && $store.state.activeChannel &&
network.channels[0] === $store.state.activeChannel.channel network.channels[0] === $store.state.activeChannel.channel
" "
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" @toggle-join-channel="network.isJoinChannelShown = !network.isJoinChannelShown"
/> />
<JoinChannel <JoinChannel
v-if="network.isJoinChannelShown" v-if="network.isJoinChannelShown"
:network="network" :network="network"
:channel="network.channels[0]" :channel="network.channels[0]"
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" @toggle-join-channel="network.isJoinChannelShown = !network.isJoinChannelShown"
/> />
<Draggable <Draggable

View file

@ -39,7 +39,7 @@
:class="['add-channel', {opened: isJoinChannelShown}]" :class="['add-channel', {opened: isJoinChannelShown}]"
:aria-controls="'join-channel-' + channel.id" :aria-controls="'join-channel-' + channel.id"
:aria-label="joinChannelLabel" :aria-label="joinChannelLabel"
@click.stop="$emit('toggleJoinChannel')" @click.stop="$emit('toggle-join-channel')"
/> />
</span> </span>
</ChannelWrapper> </ChannelWrapper>

View file

@ -86,7 +86,7 @@
"emoji-regex": "9.0.0", "emoji-regex": "9.0.0",
"eslint": "7.10.0", "eslint": "7.10.0",
"eslint-config-prettier": "6.12.0", "eslint-config-prettier": "6.12.0",
"eslint-plugin-vue": "6.2.2", "eslint-plugin-vue": "7.0.0",
"fuzzy": "0.1.3", "fuzzy": "0.1.3",
"husky": "4.3.0", "husky": "4.3.0",
"mini-css-extract-plugin": "0.11.2", "mini-css-extract-plugin": "0.11.2",

View file

@ -3383,14 +3383,15 @@ eslint-config-prettier@6.12.0:
dependencies: dependencies:
get-stdin "^6.0.0" get-stdin "^6.0.0"
eslint-plugin-vue@6.2.2: eslint-plugin-vue@7.0.0:
version "6.2.2" version "7.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe" resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.0.0.tgz#abaf59dec3aa50228b37a89ca1239893c96c981f"
integrity sha512-Nhc+oVAHm0uz/PkJAWscwIT4ijTrK5fqNqz9QB1D35SbbuMG1uB6Yr5AJpvPSWg+WOw7nYNswerYh0kOk64gqQ== integrity sha512-SFcM8ZMdVRUQKrAryl6Q5razrJtloATUOKTZoK/8yvQig1c1L3VRoMLL9AXiV3VNsKXolkk6yeMIiqGf33/Iew==
dependencies: dependencies:
eslint-utils "^2.1.0"
natural-compare "^1.4.0" natural-compare "^1.4.0"
semver "^5.6.0" semver "^7.3.2"
vue-eslint-parser "^7.0.0" vue-eslint-parser "^7.1.0"
eslint-scope@^4.0.3: eslint-scope@^4.0.3:
version "4.0.3" version "4.0.3"
@ -9585,7 +9586,7 @@ vm-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
vue-eslint-parser@^7.0.0: vue-eslint-parser@^7.1.0:
version "7.1.0" version "7.1.0"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz#9cdbcc823e656b087507a1911732b867ac101e83" resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz#9cdbcc823e656b087507a1911732b867ac101e83"
integrity sha512-Kr21uPfthDc63nDl27AGQEhtt9VrZ9nkYk/NTftJ2ws9XiJwzJJCnCr3AITQ2jpRMA0XPGDECxYH8E027qMK9Q== integrity sha512-Kr21uPfthDc63nDl27AGQEhtt9VrZ9nkYk/NTftJ2ws9XiJwzJJCnCr3AITQ2jpRMA0XPGDECxYH8E027qMK9Q==