Update eslint-plugin-vue

This commit is contained in:
Pavel Djundik 2018-07-29 20:57:14 +03:00 committed by Pavel Djundik
parent bd57c6d620
commit 6877199515
35 changed files with 148 additions and 185 deletions

View File

@ -90,6 +90,7 @@ rules:
yoda: error yoda: error
vue/html-indent: [error, tab] vue/html-indent: [error, tab]
vue/require-default-prop: off vue/require-default-prop: off
vue/no-v-html: off
plugins: plugins:
- vue - vue

View File

@ -9,8 +9,7 @@
:aria-controls="'#chan-' + channel.id" :aria-controls="'#chan-' + channel.id"
:aria-selected="activeChannel && channel === activeChannel.channel" :aria-selected="activeChannel && channel === activeChannel.channel"
class="chan" class="chan"
role="tab" role="tab">
>
<slot <slot
:network="network" :network="network"
:channel="channel" :channel="channel"

View File

@ -9,16 +9,14 @@
'hide-motd': !settings.motd, 'hide-motd': !settings.motd,
'colored-nicks': settings.coloredNicks, 'colored-nicks': settings.coloredNicks,
'show-seconds': settings.showSeconds, 'show-seconds': settings.showSeconds,
}" }">
>
<div <div
:id="'chan-' + channel.id" :id="'chan-' + channel.id"
:class="[channel.type, 'chan', 'active']" :class="[channel.type, 'chan', 'active']"
:data-id="channel.id" :data-id="channel.id"
:data-type="channel.type" :data-type="channel.type"
:aria-label="channel.name" :aria-label="channel.name"
role="tabpanel" role="tabpanel">
>
<div class="header"> <div class="header">
<button <button
class="lt" class="lt"
@ -32,8 +30,7 @@
:text="channel.topic" /></span> :text="channel.topic" /></span>
<button <button
class="menu" class="menu"
aria-label="Open the context menu" aria-label="Open the context menu" />
/>
<span <span
v-if="channel.type === 'channel'" v-if="channel.type === 'channel'"
class="rt-tooltip tooltipped tooltipped-w" class="rt-tooltip tooltipped tooltipped-w"

View File

@ -13,8 +13,7 @@
:aria-label="getInputPlaceholder(channel)" :aria-label="getInputPlaceholder(channel)"
:disabled="!$root.connected" :disabled="!$root.connected"
class="mousetrap" class="mousetrap"
@keypress.enter.exact.prevent="onSubmit" @keypress.enter.exact.prevent="onSubmit" />
/>
<span <span
v-if="$root.connected" v-if="$root.connected"
id="submit-tooltip" id="submit-tooltip"

View File

@ -1,13 +1,12 @@
<template> <template>
<aside <aside
ref="userlist" ref="userlist"
class="userlist" class="userlist">
>
<div class="count"> <div class="count">
<input <input
ref="input" ref="input"
:placeholder="channel.users.length + ' user' + (channel.users.length === 1 ? '' : 's')"
v-model="userSearchInput" v-model="userSearchInput"
:placeholder="channel.users.length + ' user' + (channel.users.length === 1 ? '' : 's')"
type="search" type="search"
class="search" class="search"
aria-label="Search among the user list" aria-label="Search among the user list"
@ -16,28 +15,26 @@
@keydown.down="navigateUserList(1)" @keydown.down="navigateUserList(1)"
@keydown.page-up="navigateUserList(-10)" @keydown.page-up="navigateUserList(-10)"
@keydown.page-down="navigateUserList(10)" @keydown.page-down="navigateUserList(10)"
@keydown.enter="selectUser" @keydown.enter="selectUser">
>
</div> </div>
<div class="names"> <div class="names">
<div <div
v-for="(users, mode) in groupedUsers" v-for="(users, mode) in groupedUsers"
:key="mode" :key="mode"
:class="['user-mode', getModeClass(mode)]" :class="['user-mode', getModeClass(mode)]">
>
<template v-if="userSearchInput.length > 0"> <template v-if="userSearchInput.length > 0">
<UsernameFiltered <UsernameFiltered
v-for="user in users" v-for="user in users"
:on-hover="hoverUser"
:key="user.original.nick" :key="user.original.nick"
:on-hover="hoverUser"
:active="user.original === activeUser" :active="user.original === activeUser"
:user="user" /> :user="user" />
</template> </template>
<template v-else> <template v-else>
<Username <Username
v-for="user in users" v-for="user in users"
:on-hover="hoverUser"
:key="user.nick" :key="user.nick"
:on-hover="hoverUser"
:active="user === activeUser" :active="user === activeUser"
:user="user" /> :user="user" />
</template> </template>

View File

@ -6,11 +6,10 @@
action="" action=""
autocomplete="off" autocomplete="off"
@keydown.esc.prevent="$emit('toggleJoinChannel')" @keydown.esc.prevent="$emit('toggleJoinChannel')"
@submit.prevent="onSubmit" @submit.prevent="onSubmit">
>
<input <input
v-focus
v-model="inputChannel" v-model="inputChannel"
v-focus
type="text" type="text"
class="input" class="input"
name="channel" name="channel"
@ -18,8 +17,7 @@
pattern="[^\s]+" pattern="[^\s]+"
maxlength="200" maxlength="200"
title="The channel name may not contain spaces" title="The channel name may not contain spaces"
required required>
>
<input <input
v-model="inputPassword" v-model="inputPassword"
type="password" type="password"
@ -29,8 +27,7 @@
pattern="[^\s]+" pattern="[^\s]+"
maxlength="200" maxlength="200"
title="The channel password may not contain spaces" title="The channel password may not contain spaces"
autocomplete="new-password" autocomplete="new-password">
>
<button <button
type="submit" type="submit"
class="btn btn-small">Join</button> class="btn btn-small">Join</button>

View File

@ -38,8 +38,7 @@
:aria-expanded="isContentShown" :aria-expanded="isContentShown"
:aria-label="moreButtonLabel" :aria-label="moreButtonLabel"
class="more" class="more"
@click="onMoreClick" @click="onMoreClick"><span class="more-caret" /></button>
><span class="more-caret"/></button>
</div> </div>
<div class="body overflowable"> <div class="body overflowable">
@ -112,8 +111,7 @@
:aria-expanded="isContentShown" :aria-expanded="isContentShown"
:aria-label="moreButtonLabel" :aria-label="moreButtonLabel"
class="more" class="more"
@click="onMoreClick" @click="onMoreClick"><span class="more-caret" /></button>
><span class="more-caret"/></button>
</template> </template>
</template> </template>
</div> </div>

View File

@ -2,8 +2,7 @@
<div <div
:id="'msg-' + message.id" :id="'msg-' + message.id"
:class="['msg', message.type, {self: message.self, highlight: message.highlight}]" :class="['msg', message.type, {self: message.self, highlight: message.highlight}]"
:data-from="message.from && message.from.nick" :data-from="message.from && message.from.nick">
>
<span <span
:aria-label="message.time | localetime" :aria-label="message.time | localetime"
class="time tooltipped tooltipped-e">{{ message.time | tz }}</span> class="time tooltipped tooltipped-e">{{ message.time | tz }}</span>
@ -30,8 +29,8 @@
:message="message" /></span> :message="message" /></span>
<LinkPreview <LinkPreview
v-for="preview in message.previews" v-for="preview in message.previews"
:keep-scroll-position="keepScrollPosition"
:key="preview.link" :key="preview.link"
:keep-scroll-position="keepScrollPosition"
:link="preview" /> :link="preview" />
</span> </span>
</template> </template>
@ -47,8 +46,8 @@
:message="message" /></span> :message="message" /></span>
<LinkPreview <LinkPreview
v-for="preview in message.previews" v-for="preview in message.previews"
:keep-scroll-position="keepScrollPosition"
:key="preview.link" :key="preview.link"
:keep-scroll-position="keepScrollPosition"
:link="preview" /> :link="preview" />
</span> </span>
</template> </template>

View File

@ -11,9 +11,9 @@
</div> </div>
<Message <Message
v-for="message in messages" v-for="message in messages"
:key="message.id"
:network="network" :network="network"
:message="message" :message="message" />
:key="message.id"/>
</div> </div>
</template> </template>

View File

@ -1,15 +1,13 @@
<template> <template>
<div <div
ref="chat" ref="chat"
class="chat" class="chat">
>
<div :class="['show-more', { show: channel.moreHistoryAvailable }]"> <div :class="['show-more', { show: channel.moreHistoryAvailable }]">
<button <button
ref="loadMoreButton" ref="loadMoreButton"
:disabled="channel.historyLoading || !$root.connected" :disabled="channel.historyLoading || !$root.connected"
class="btn" class="btn"
@click="onShowMoreClick" @click="onShowMoreClick">
>
<span v-if="channel.historyLoading">Loading</span> <span v-if="channel.historyLoading">Loading</span>
<span v-else>Show older messages</span> <span v-else>Show older messages</span>
</button> </button>
@ -19,16 +17,14 @@
role="log" role="log"
aria-live="polite" aria-live="polite"
aria-relevant="additions" aria-relevant="additions"
@copy="onCopy" @copy="onCopy">
>
<template v-for="(message, id) in condensedMessages"> <template v-for="(message, id) in condensedMessages">
<div <div
v-if="shouldDisplayDateMarker(message, id)" v-if="shouldDisplayDateMarker(message, id)"
:key="message.id + '-date'" :key="message.id + '-date'"
:data-time="message.time" :data-time="message.time"
:aria-label="message.time | localedate" :aria-label="message.time | localedate"
class="date-marker-container tooltipped tooltipped-s" class="date-marker-container tooltipped tooltipped-s">
>
<div class="date-marker"> <div class="date-marker">
<span <span
:data-label="message.time | friendlydate" :data-label="message.time | friendlydate"
@ -38,8 +34,7 @@
<div <div
v-if="shouldDisplayUnreadMarker(id)" v-if="shouldDisplayUnreadMarker(id)"
:key="message.id + '-unread'" :key="message.id + '-unread'"
class="unread-marker" class="unread-marker">
>
<span class="unread-marker-text" /> <span class="unread-marker-text" />
</div> </div>
@ -47,12 +42,13 @@
v-if="message.type === 'condensed'" v-if="message.type === 'condensed'"
:key="message.id" :key="message.id"
:network="network" :network="network"
:keep-scroll-position="keepScrollPosition"
:messages="message.messages" /> :messages="message.messages" />
<Message <Message
v-else v-else
:key="message.id"
:network="network" :network="network"
:message="message" :message="message"
:key="message.id"
:keep-scroll-position="keepScrollPosition" :keep-scroll-position="keepScrollPosition"
@linkPreviewToggle="onLinkPreviewToggle" /> @linkPreviewToggle="onLinkPreviewToggle" />
</template> </template>

View File

@ -15,30 +15,27 @@
> >
<div <div
v-for="network in networks" v-for="network in networks"
:id="'network-' + network.uuid"
:key="network.uuid" :key="network.uuid"
:class="{ :class="{
collapsed: network.isCollapsed, collapsed: network.isCollapsed,
'not-connected': !network.status.connected, 'not-connected': !network.status.connected,
'not-secure': !network.status.secure, 'not-secure': !network.status.secure,
}" }"
:id="'network-' + network.uuid"
:data-uuid="network.uuid" :data-uuid="network.uuid"
:data-nick="network.nick" :data-nick="network.nick"
class="network" class="network"
role="region" role="region">
>
<NetworkLobby <NetworkLobby
:network="network" :network="network"
:active-channel="activeChannel" :active-channel="activeChannel"
:is-join-channel-shown="network.isJoinChannelShown" :is-join-channel-shown="network.isJoinChannelShown"
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" @toggleJoinChannel="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" @toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown" />
/>
<Draggable <Draggable
:options="{ draggable: '.chan', ghostClass: 'chan-placeholder' }" :options="{ draggable: '.chan', ghostClass: 'chan-placeholder' }"
@ -49,13 +46,11 @@
@end="onDragEnd" @end="onDragEnd"
> >
<Channel <Channel
v-for="(channel, index) in network.channels" v-for="channel in getChannelsWithoutLobby(network)"
v-if="index > 0"
:key="channel.id" :key="channel.id"
:channel="channel" :channel="channel"
:network="network" :network="network"
:active-channel="activeChannel" :active-channel="activeChannel" />
/>
</Draggable> </Draggable>
</div> </div>
</Draggable> </Draggable>

View File

@ -9,8 +9,7 @@
:aria-label="getExpandLabel(network)" :aria-label="getExpandLabel(network)"
:aria-expanded="!network.isCollapsed" :aria-expanded="!network.isCollapsed"
class="collapse-network" class="collapse-network"
@click.stop="onCollapseClick" @click.stop="onCollapseClick"><span class="collapse-network-icon" /></button>
><span class="collapse-network-icon"/></button>
<span <span
v-else v-else
class="collapse-network" /> class="collapse-network" />

View File

@ -80,8 +80,7 @@
"css.escape": "1.5.1", "css.escape": "1.5.1",
"emoji-regex": "7.0.3", "emoji-regex": "7.0.3",
"eslint": "5.13.0", "eslint": "5.13.0",
"eslint-plugin-vue": "4.5.0", "eslint-plugin-vue": "5.0.0",
"eslint-plugin-vue": "4.7.1",
"fuzzy": "0.1.3", "fuzzy": "0.1.3",
"graphql-request": "1.8.2", "graphql-request": "1.8.2",
"handlebars": "4.1.0", "handlebars": "4.1.0",

View File

@ -760,25 +760,15 @@ acorn-dynamic-import@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948"
acorn-jsx@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
dependencies:
acorn "^3.0.4"
acorn-jsx@^5.0.0: acorn-jsx@^5.0.0:
version "5.0.0" version "5.0.0"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.0.tgz#958584ddb60990c02c97c1bd9d521fce433bb101" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.0.tgz#958584ddb60990c02c97c1bd9d521fce433bb101"
acorn@^3.0.4: acorn@^6.0.2:
version "3.3.0" version "6.0.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.2.tgz#6a459041c320ab17592c6317abbfdf4bbaa98ca4"
acorn@^5.5.0: acorn@^6.0.5:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
acorn@^6.0.2, acorn@^6.0.5:
version "6.0.5" version "6.0.5"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a"
@ -2586,18 +2576,12 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
eslint-plugin-vue@4.7.1: eslint-plugin-vue@5.0.0:
version "4.7.1" version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.7.1.tgz#c829b9fc62582c1897b5a0b94afd44ecca511e63" resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.0.0.tgz#4a2cc1c0e71ea45e1bd9c1a60f925bfe68bb5710"
integrity sha512-mSv2Ebz3RaPP+XJO/mu7F+SdR9lrMyGISSExnarLFqqf3pF5wTmwWNrhHW1o9zKzKI811UVTIIkWJJvgO6SsUQ==
dependencies: dependencies:
vue-eslint-parser "^2.0.3" vue-eslint-parser "^4.0.2"
eslint-scope@^3.7.1:
version "3.7.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535"
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-scope@^4.0.0: eslint-scope@^4.0.0:
version "4.0.0" version "4.0.0"
@ -2655,12 +2639,14 @@ eslint@5.13.0:
table "^5.0.2" table "^5.0.2"
text-table "^0.2.0" text-table "^0.2.0"
espree@^3.5.2: espree@^4.1.0:
version "3.5.4" version "4.1.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f"
integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==
dependencies: dependencies:
acorn "^5.5.0" acorn "^6.0.2"
acorn-jsx "^3.0.0" acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
espree@^5.0.0: espree@^5.0.0:
version "5.0.0" version "5.0.0"
@ -2678,7 +2664,7 @@ esprima@^4.0.0:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
esquery@^1.0.0, esquery@^1.0.1: esquery@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies: dependencies:
@ -7641,16 +7627,17 @@ vm-browserify@0.0.4:
dependencies: dependencies:
indexof "0.0.1" indexof "0.0.1"
vue-eslint-parser@^2.0.3: vue-eslint-parser@^4.0.2:
version "2.0.3" version "4.0.3"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1" resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-4.0.3.tgz#80cf162e484387b2640371ad21ba1f86e0c10a61"
integrity sha512-AUeQsYdO6+7QXCems+WvGlrXd37PHv/zcRQSQdY1xdOMwdFAPEnMBsv7zPvk0TPGulXkK/5p/ITgrjiYB7k3ag==
dependencies: dependencies:
debug "^3.1.0" debug "^4.1.0"
eslint-scope "^3.7.1" eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0" eslint-visitor-keys "^1.0.0"
espree "^3.5.2" espree "^4.1.0"
esquery "^1.0.0" esquery "^1.0.1"
lodash "^4.17.4" lodash "^4.17.11"
vue-hot-reload-api@^2.3.0: vue-hot-reload-api@^2.3.0:
version "2.3.0" version "2.3.0"