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,
'vue/html-indent': ['error', 'tab'],
// only debug console
'no-console': ['error', { allow: ['error', 'warn', 'debug'] }],
'no-console': ['warn', { allow: ['error', 'warn', 'debug'] }],
// classes blocks
'padded-blocks': ['error', { classes: 'always' }],
// always have the operator in front

View File

@@ -39,18 +39,19 @@
<div id="stack-add">
<form>
<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">
<span class="hidden-visually">Submit</span>
</button>
</form>
</div>
<button title="Show archived cards">
<i class="icon icon-archive"></i>
<i class="icon icon-archive" />
<span class="hidden-visually">Show archived cards</span>
</button>
<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>
</button>
<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="hidden-visually">Close</span>
</span>
<router-view name="sidebar"></router-view>
<router-view name="sidebar" />
</div>
</template>

View File

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

View File

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

View File

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

View File

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

View File

@@ -24,12 +24,14 @@ export default {
methods: {
hexToRgb(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),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null
}
}
return null
},
rgb2hls(rgb) {
// RGB2HLS by Garry Tan