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
vue/html-indent: [error, tab]
vue/require-default-prop: off
vue/no-v-html: off
plugins:
- vue

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -760,25 +760,15 @@ acorn-dynamic-import@^4.0.0:
version "4.0.0"
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:
version "5.0.0"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.0.tgz#958584ddb60990c02c97c1bd9d521fce433bb101"
acorn@^3.0.4:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
acorn@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.2.tgz#6a459041c320ab17592c6317abbfdf4bbaa98ca4"
acorn@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
acorn@^6.0.2, acorn@^6.0.5:
acorn@^6.0.5:
version "6.0.5"
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"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
eslint-plugin-vue@4.7.1:
version "4.7.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.7.1.tgz#c829b9fc62582c1897b5a0b94afd44ecca511e63"
eslint-plugin-vue@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.0.0.tgz#4a2cc1c0e71ea45e1bd9c1a60f925bfe68bb5710"
integrity sha512-mSv2Ebz3RaPP+XJO/mu7F+SdR9lrMyGISSExnarLFqqf3pF5wTmwWNrhHW1o9zKzKI811UVTIIkWJJvgO6SsUQ==
dependencies:
vue-eslint-parser "^2.0.3"
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"
vue-eslint-parser "^4.0.2"
eslint-scope@^4.0.0:
version "4.0.0"
@ -2655,12 +2639,14 @@ eslint@5.13.0:
table "^5.0.2"
text-table "^0.2.0"
espree@^3.5.2:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
espree@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f"
integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==
dependencies:
acorn "^5.5.0"
acorn-jsx "^3.0.0"
acorn "^6.0.2"
acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
espree@^5.0.0:
version "5.0.0"
@ -2678,7 +2664,7 @@ esprima@^4.0.0:
version "4.0.1"
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"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies:
@ -7641,16 +7627,17 @@ vm-browserify@0.0.4:
dependencies:
indexof "0.0.1"
vue-eslint-parser@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1"
vue-eslint-parser@^4.0.2:
version "4.0.3"
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:
debug "^3.1.0"
eslint-scope "^3.7.1"
debug "^4.1.0"
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
espree "^3.5.2"
esquery "^1.0.0"
lodash "^4.17.4"
espree "^4.1.0"
esquery "^1.0.1"
lodash "^4.17.11"
vue-hot-reload-api@^2.3.0:
version "2.3.0"