Fix some eslint errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-02-14 13:58:15 +01:00
parent b46e4c918a
commit bd0aa664b8
8 changed files with 26 additions and 15 deletions

View File

@@ -40,7 +40,7 @@ module.exports = {
'no-tabs': 0, 'no-tabs': 0,
'vue/html-indent': ['error', 'tab'], 'vue/html-indent': ['error', 'tab'],
// only debug console // only debug console
'no-console': ['error', { allow: ['error', 'warn', 'debug'] }], 'no-console': ['warn', { allow: ['error', 'warn', 'debug'] }],
// classes blocks // classes blocks
'padded-blocks': ['error', { classes: 'always' }], 'padded-blocks': ['error', { classes: 'always' }],
// always have the operator in front // always have the operator in front

View File

@@ -39,18 +39,19 @@
<div id="stack-add"> <div id="stack-add">
<form> <form>
<label for="new-stack-input-main" class="hidden-visually">Add a new stack</label> <label for="new-stack-input-main" class="hidden-visually">Add a new stack</label>
<input type="text" class="no-close" id="new-stack-input-main" placeholder="Add a new stack"> <input id="new-stack-input-main" type="text" class="no-close"
placeholder="Add a new stack">
<button class="button-inline icon icon-add" type="submit" title="Submit"> <button class="button-inline icon icon-add" type="submit" title="Submit">
<span class="hidden-visually">Submit</span> <span class="hidden-visually">Submit</span>
</button> </button>
</form> </form>
</div> </div>
<button title="Show archived cards"> <button title="Show archived cards">
<i class="icon icon-archive"></i> <i class="icon icon-archive" />
<span class="hidden-visually">Show archived cards</span> <span class="hidden-visually">Show archived cards</span>
</button> </button>
<button title="Toggle compact mode"> <button title="Toggle compact mode">
<i class="icon icon-toggle-compact-expanded"></i> <i class="icon icon-toggle-compact-expanded" />
<span class="hidden-visually">Toggle compact mode</span> <span class="hidden-visually">Toggle compact mode</span>
</button> </button>
<router-link v-tooltip="t('deck', 'Board settings')" :to="{name: 'board.details'}" class="icon-settings" <router-link v-tooltip="t('deck', 'Board settings')" :to="{name: 'board.details'}" class="icon-settings"

View File

@@ -25,7 +25,7 @@
<span class="icon-close" title="Close" @click="closeSidebar"> <span class="icon-close" title="Close" @click="closeSidebar">
<span class="hidden-visually">Close</span> <span class="hidden-visually">Close</span>
</span> </span>
<router-view name="sidebar"></router-view> <router-view name="sidebar" />
</div> </div>
</template> </template>

View File

@@ -34,7 +34,7 @@
</container> </container>
<div class="card create"> <div class="card create">
<div title="Add card"> <div title="Add card">
<i class="icon icon-add"></i> <i class="icon icon-add" />
<span class="hidden-visually">Add card</span> <span class="hidden-visually">Add card</span>
</div> </div>
</div> </div>
@@ -53,7 +53,7 @@
<script> <script>
import { Container, Draggable } from 'vue-smooth-dnd' import { Container, Draggable } from 'vue-smooth-dnd'
import { mapState, mapGetters } from 'vuex' import { mapState } from 'vuex'
import Controls from '../Controls' import Controls from '../Controls'
import CardItem from '../cards/CardItem' import CardItem from '../cards/CardItem'

View File

@@ -25,7 +25,7 @@
<i v-if="true" class="icon icon-description" title="" /> <i v-if="true" class="icon icon-description" title="" />
<span v-if="true" class="due"> <span v-if="true" class="due">
<i class="icon icon-badge" /> <i class="icon icon-badge" />
<span data-timestamp="" class="live-relative-timestamp"></span> <span data-timestamp="" class="live-relative-timestamp" />
</span> </span>
<div v-if="true" class="card-tasks"> <div v-if="true" class="card-tasks">
<i class="icon icon-checkmark" /> <i class="icon icon-checkmark" />
@@ -53,7 +53,10 @@ export default {
name: 'CardBadges', name: 'CardBadges',
components: { Avatar }, components: { Avatar },
props: { props: {
id: {} id: {
type: Number,
default: null
}
}, },
computed: { computed: {
compactMode() { compactMode() {

View File

@@ -21,7 +21,7 @@
--> -->
<template> <template>
<div @click="openCard" tag="div" class="card"> <div tag="div" class="card" @click="openCard">
<div class="card-upper"> <div class="card-upper">
<h3>{{ card.title }}</h3> <h3>{{ card.title }}</h3>
<ul class="labels"> <ul class="labels">
@@ -41,7 +41,7 @@
</template> </template>
<script> <script>
import { Avatar, PopoverMenu } from 'nextcloud-vue' import { PopoverMenu } from 'nextcloud-vue'
import ClickOutside from 'vue-click-outside' import ClickOutside from 'vue-click-outside'
import CardBadges from './CardBadges' import CardBadges from './CardBadges'
@@ -55,7 +55,10 @@ export default {
}, },
mixins: [Color], mixins: [Color],
props: { props: {
id: {} id: {
type: Number,
default: null
}
}, },
data() { data() {
return { return {

View File

@@ -102,6 +102,8 @@ export default {
} }
}, },
actions: function() { actions: function() {
/* eslint-disable vue/no-side-effects-in-computed-properties */
/* eslint-disable vue/no-async-in-computed-properties */
const actions = [] const actions = []
// do not show actions while the item is loading // do not show actions while the item is loading

View File

@@ -24,12 +24,14 @@ export default {
methods: { methods: {
hexToRgb(hex) { hexToRgb(hex) {
let result = /^#?([A-Fa-f\d]{2})([A-Fa-f\d]{2})([A-Fa-f\d]{2})$/i.exec(hex) let result = /^#?([A-Fa-f\d]{2})([A-Fa-f\d]{2})([A-Fa-f\d]{2})$/i.exec(hex)
return result if (result) {
? { return {
r: parseInt(result[1], 16), r: parseInt(result[1], 16),
g: parseInt(result[2], 16), g: parseInt(result[2], 16),
b: parseInt(result[3], 16) b: parseInt(result[3], 16)
} : null }
}
return null
}, },
rgb2hls(rgb) { rgb2hls(rgb) {
// RGB2HLS by Garry Tan // RGB2HLS by Garry Tan