Use vue/recommended eslint setting

This commit is contained in:
Matthias 2020-08-31 17:43:44 +02:00
parent 2de6592b03
commit 5f1ce3d7a3
15 changed files with 36 additions and 36 deletions

View File

@ -5,7 +5,7 @@ module.exports = {
}, },
extends: [ extends: [
'plugin:vue/essential', 'plugin:vue/essential',
// 'plugin:vue/recommended', 'plugin:vue/recommended',
'@vue/airbnb', '@vue/airbnb',
'prettier', 'prettier',
'plugin:prettier-vue/recommended', 'plugin:prettier-vue/recommended',

View File

@ -15,10 +15,10 @@
<b-dropdown-item-button <b-dropdown-item-button
v-for="(theme, key) in themes" v-for="(theme, key) in themes"
:key="key" :key="key"
@click="handleClick"
:active="activeTheme === theme.name"
v-b-tooltip.hover.right v-b-tooltip.hover.right
:active="activeTheme === theme.name"
:title="theme.description" :title="theme.description"
@click="handleClick"
>{{ theme.name }}</b-dropdown-item-button >{{ theme.name }}</b-dropdown-item-button
> >
</b-nav-item-dropdown> </b-nav-item-dropdown>
@ -29,6 +29,7 @@
import axios from 'axios'; import axios from 'axios';
export default { export default {
name: 'BootswatchThemeSelect',
data() { data() {
return { return {
activeTheme: '', activeTheme: '',
@ -124,7 +125,6 @@ export default {
], ],
}; };
}, },
name: 'BootswatchThemeSelect',
mounted() { mounted() {
// If a theme has been stored in localstorage, the theme will be set. // If a theme has been stored in localstorage, the theme will be set.
if (window.localStorage.theme) this.setTheme(window.localStorage.theme); if (window.localStorage.theme) this.setTheme(window.localStorage.theme);

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="container"> <div class="container">
<form ref="form" @submit.stop.prevent="handleSubmit" @reset="handleReset" novalidate> <form ref="form" novalidate @submit.stop.prevent="handleSubmit" @reset="handleReset">
<b-form-group <b-form-group
:state="urlState" :state="urlState"
label="API Url" label="API Url"
@ -11,8 +11,8 @@
id="url-input" id="url-input"
v-model="auth.url" v-model="auth.url"
:state="urlState" :state="urlState"
@keydown.enter.native="handleOk"
required required
@keydown.enter.native="handleOk"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<b-form-group <b-form-group
@ -25,8 +25,8 @@
id="username-input" id="username-input"
v-model="auth.username" v-model="auth.username"
:state="nameState" :state="nameState"
@keydown.enter.native="handleOk"
required required
@keydown.enter.native="handleOk"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<b-form-group label="Password" label-for="password-input" invalid-feedback="Invalid Password"> <b-form-group label="Password" label-for="password-input" invalid-feedback="Invalid Password">
@ -34,8 +34,8 @@
id="password-input" id="password-input"
v-model="auth.password" v-model="auth.password"
required required
@keydown.enter.native="handleOk"
type="password" type="password"
@keydown.enter.native="handleOk"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<div v-if="inModal === false" class="float-right"> <div v-if="inModal === false" class="float-right">

View File

@ -1,11 +1,11 @@
<template> <template>
<div> <div>
<b-alert <b-alert
v-for="(alert, index) in activeMessages"
:key="index"
variant="warning" variant="warning"
dismissible dismissible
:show="5" :show="5"
v-for="(alert, index) in activeMessages"
:key="index"
:value="!!alert.message" :value="!!alert.message"
@dismissed="closeAlert" @dismissed="closeAlert"
> >

View File

@ -6,13 +6,13 @@
<button class="btn-primary col-md-5 m-1" @click="stopBuy()">StopBuy</button> <button class="btn-primary col-md-5 m-1" @click="stopBuy()">StopBuy</button>
<button class="btn-primary col-md-5 m-1" @click="reloadConfig()">Reload Config</button> <button class="btn-primary col-md-5 m-1" @click="reloadConfig()">Reload Config</button>
<button <button
class="btn-primary col-md-5 m-1"
v-if="botState.forcebuy_enabled" v-if="botState.forcebuy_enabled"
class="btn-primary col-md-5 m-1"
@click="initiateForcebuy" @click="initiateForcebuy"
> >
Forcebuy Forcebuy
</button> </button>
<ForceBuyForm :modalShow="forcebuyShow" @close="this.$bvModal.hide('forcebuy-modal')" /> <ForceBuyForm :modal-show="forcebuyShow" @close="this.$bvModal.hide('forcebuy-modal')" />
</div> </div>
</div> </div>
</template> </template>

View File

@ -5,7 +5,7 @@
<b-button class="float-right" size="sm" @click="getDaily">&#x21bb;</b-button> <b-button class="float-right" size="sm" @click="getDaily">&#x21bb;</b-button>
</div> </div>
<div> <div>
<DailyChart v-if="dailyStats.data" :dailyStats="dailyStats" /> <DailyChart v-if="dailyStats.data" :daily-stats="dailyStats" />
</div> </div>
<div> <div>
<b-table class="table-sm" :items="dailyStats.data" :fields="dailyFields"> </b-table> <b-table class="table-sm" :items="dailyStats.data" :fields="dailyFields"> </b-table>

View File

@ -36,8 +36,8 @@
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<b-button <b-button
class="float-right mb-2"
id="blacklist-submit" id="blacklist-submit"
class="float-right mb-2"
size="sm" size="sm"
type="submit" type="submit"
@click="addBlacklistPair" @click="addBlacklistPair"

View File

@ -13,8 +13,8 @@
<b-form-input <b-form-input
id="pair-input" id="pair-input"
v-model="pair" v-model="pair"
@keydown.enter.native="handleBuy"
required required
@keydown.enter.native="handleBuy"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
<b-form-group <b-form-group
@ -25,9 +25,9 @@
<b-form-input <b-form-input
id="price-input" id="price-input"
v-model="price" v-model="price"
@keydown.enter.native="handleBuy"
type="number" type="number"
step="0.01" step="0.01"
@keydown.enter.native="handleBuy"
></b-form-input> ></b-form-input>
</b-form-group> </b-form-group>
</form> </form>

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<button @click="refreshAll()" class="btn btn-secondary">Refresh all</button> <button class="btn btn-secondary" @click="refreshAll()">Refresh all</button>
<b-form-checkbox class="float-right" v-model="autoRefreshLoc" size="lg" switch <b-form-checkbox v-model="autoRefreshLoc" class="float-right" size="lg" switch
>AutoRefresh</b-form-checkbox >AutoRefresh</b-form-checkbox
> >
</div> </div>

View File

@ -6,25 +6,25 @@
<ValuePair description="Pair">{{ trade.pair }}</ValuePair> <ValuePair description="Pair">{{ trade.pair }}</ValuePair>
<ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair> <ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair>
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair> <ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
<ValuePair description="Close Rate" v-if="!trade.is_open">{{ trade.close_rate }}</ValuePair> <ValuePair v-if="!trade.is_open" description="Close Rate">{{ trade.close_rate }}</ValuePair>
<ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair> <ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair>
<ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair> <ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair>
<ValuePair description="Close date" v-if="trade.close_timestamp">{{ <ValuePair v-if="trade.close_timestamp" description="Close date">{{
timestampms(trade.close_timestamp) timestampms(trade.close_timestamp)
}}</ValuePair> }}</ValuePair>
</b-card-text> </b-card-text>
<h5 class="detail-header">Profit</h5> <h5 class="detail-header">Profit</h5>
<b-card-text> <b-card-text>
<ValuePair description="Current % profit" v-if="trade.current_profit_pct"> <ValuePair v-if="trade.current_profit_pct" description="Current % profit">
{{ formatPercent(trade.current_profit_pct) }} {{ formatPercent(trade.current_profit_pct) }}
</ValuePair> </ValuePair>
<ValuePair description="Current profit" v-if="trade.current_profit_abs"> <ValuePair v-if="trade.current_profit_abs" description="Current profit">
{{ trade.current_profit_abs }} {{ trade.current_profit_abs }}
</ValuePair> </ValuePair>
<ValuePair description="Close % profit" v-if="trade.close_profit"> <ValuePair v-if="trade.close_profit" description="Close % profit">
{{ formatPercent(trade.close_profit) }} {{ formatPercent(trade.close_profit) }}
</ValuePair> </ValuePair>
<ValuePair description="Close profit" v-if="trade.close_profit_abs"> <ValuePair v-if="trade.close_profit_abs" description="Close profit">
{{ trade.close_profit_abs }} {{ trade.close_profit_abs }}
</ValuePair> </ValuePair>
</b-card-text> </b-card-text>

View File

@ -5,18 +5,18 @@
class="table-sm" class="table-sm"
:items="trades" :items="trades"
:fields="tableFields" :fields="tableFields"
@row-contextmenu="handleContextMenuEvent"
show-empty show-empty
:emptyText="emptyText" :empty-text="emptyText"
:per-page="perPage" :per-page="perPage"
:current-page="currentPage" :current-page="currentPage"
selectable selectable
select-mode="single" select-mode="single"
@row-contextmenu="handleContextMenuEvent"
@row-selected="onRowSelected" @row-selected="onRowSelected"
> >
<template v-slot:cell(actions)="row"> <template v-slot:cell(actions)="row">
<b-button size="sm" @click="forcesellHandler(row.item)" title="Forcesell"> FS </b-button> <b-button size="sm" title="Forcesell" @click="forcesellHandler(row.item)"> FS </b-button>
<b-button size="sm" @click="removeTradeHandler(row.item)" title="Delete trade"> <b-button size="sm" title="Delete trade" @click="removeTradeHandler(row.item)">
RM RM
</b-button> </b-button>
</template> </template>

View File

@ -21,13 +21,13 @@
{{ isBotOnline ? 'Online' : 'Offline' }} {{ isBotOnline ? 'Online' : 'Offline' }}
</b-nav-text> </b-nav-text>
</li> </li>
<li class="nav-item" v-if="loggedIn"> <li v-if="loggedIn" class="nav-item">
<b-nav-item-dropdown right> <b-nav-item-dropdown right>
<template v-slot:button-content> <template v-slot:button-content>
<b-avatar button>FT</b-avatar> <b-avatar button>FT</b-avatar>
</template> </template>
<b-dropdown-item to="/settings">Settings</b-dropdown-item> <b-dropdown-item to="/settings">Settings</b-dropdown-item>
<b-dropdown-item to="/" v-on:click.native="logout()">Sign Out</b-dropdown-item> <b-dropdown-item to="/" @click.native="logout()">Sign Out</b-dropdown-item>
</b-nav-item-dropdown> </b-nav-item-dropdown>
</li> </li>
<li v-else> <li v-else>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<DailyChart v-if="dailyStats.data" :dailyStats="dailyStats" /> <DailyChart v-if="dailyStats.data" :daily-stats="dailyStats" />
<CumProfitChart :trades="closedTrades" /> <CumProfitChart :trades="closedTrades" />
<HourlyChart :trades="closedTrades" /> <HourlyChart :trades="closedTrades" />
</div> </div>

View File

@ -2,7 +2,7 @@
<div> <div>
<b-button v-b-modal.modal-prevent-closing>Login</b-button> <b-button v-b-modal.modal-prevent-closing>Login</b-button>
<b-modal id="modal-prevent-closing" ref="modal" title="Submit Your Name" @ok="handleOk"> <b-modal id="modal-prevent-closing" ref="modal" title="Submit Your Name" @ok="handleOk">
<Login id="loginForm" ref="loginForm" inModal /> <Login id="loginForm" ref="loginForm" in-modal />
</b-modal> </b-modal>
</div> </div>
</template> </template>

View File

@ -38,19 +38,19 @@
class="open-trades" class="open-trades"
:trades="openTrades" :trades="openTrades"
title="Open trades" title="Open trades"
v-bind:activeTrades="true" :active-trades="true"
emptyText="Currently no open trades." empty-text="Currently no open trades."
/> />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<TradeList <TradeList
v-if="!detailTradeId"
class="trade-history" class="trade-history"
:trades="closedTrades" :trades="closedTrades"
title="Trade history" title="Trade history"
emptyText="No closed trades so far." empty-text="No closed trades so far."
v-if="!detailTradeId"
/> />
<TradeDetail v-if="detailTradeId" :trade="tradeDetail"></TradeDetail> <TradeDetail v-if="detailTradeId" :trade="tradeDetail"></TradeDetail>
</div> </div>