fix linter issues

This commit is contained in:
hay-kot 2021-08-07 16:49:55 -08:00
parent a1b1b529a3
commit 3ed197a843
21 changed files with 58 additions and 33 deletions

View File

@ -57,9 +57,11 @@ export default {
props: {
comments: {
type: Array,
default: () => [],
},
slug: {
type: String,
required: true,
},
},
data() {
@ -85,7 +87,7 @@ export default {
},
methods: {
resetImage() {
this.hideImage == false;
this.hideImage = false;
},
getProfileImage(id) {
return api.users.userProfileImage(id);

View File

@ -41,7 +41,7 @@ export default {
const split = this.inputText.split("\n");
split.forEach((element, index) => {
if ((element === "\n") | (element == false)) {
if ((element === "\n") | (element === false)) {
split.splice(index, 1);
}
});

View File

@ -49,7 +49,10 @@
<script>
export default {
props: {
extras: Object,
extras: {
type: Object,
default: () => ({}),
},
},
data() {
return {
@ -57,8 +60,8 @@ export default {
dialog: false,
formKey: 1,
rules: {
required: v => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: v => !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
required: (v) => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: (v) => !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
},
};
},

View File

@ -84,6 +84,7 @@ export default {
props: {
value: {
type: Array,
default: () => [],
},
edit: {

View File

@ -97,6 +97,7 @@ export default {
props: {
value: {
type: Array,
required: true,
},
edit: {
@ -115,13 +116,13 @@ export default {
value: {
handler() {
this.disabledSteps = [];
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
this.showTitleEditor = this.value.map((x) => this.validateTitle(x.title));
},
},
},
mounted() {
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
this.showTitleEditor = this.value.map((x) => this.validateTitle(x.title));
},
methods: {
@ -148,8 +149,6 @@ export default {
isChecked(stepIndex) {
if (this.disabledSteps.includes(stepIndex) && !this.edit) {
return "disabled-card";
} else {
}
},
toggleShowTitle(index) {

View File

@ -43,6 +43,7 @@ export default {
props: {
value: {
type: Array,
required: true,
},
edit: {

View File

@ -21,7 +21,7 @@
<v-list v-if="showViewer" dense class="mt-0 pt-0">
<v-list-item v-for="(item, key, index) in labels" :key="index">
<v-list-item-content>
<v-list-item-title class="pl-4 text-subtitle-1 flex row ">
<v-list-item-title class="pl-4 text-subtitle-1 flex row">
<div>{{ item.label }}</div>
<div class="ml-auto mr-1">{{ value[key] }}</div>
<div>{{ item.suffix }}</div>
@ -36,7 +36,10 @@
<script>
export default {
props: {
value: {},
value: {
type: Object,
required: true,
},
edit: {
type: Boolean,
default: true,

View File

@ -69,7 +69,10 @@ export default {
VueMarkdown,
},
props: {
recipe: Object,
recipe: {
type: Object,
required: true,
},
},
};
</script>

View File

@ -37,7 +37,10 @@
export default {
components: {},
props: {
value: Object,
value: {
type: Object,
required: true,
},
},
computed: {

View File

@ -36,9 +36,11 @@
export default {
props: {
copyText: {
type: String,
default: "Default Copy Text",
},
color: {
type: String,
default: "primary",
},
},

View File

@ -24,6 +24,7 @@
export default {
props: {
loading: {
type: Boolean,
default: true,
},
small: {
@ -62,7 +63,7 @@ export default {
},
waitingText() {
return this.$t("general.loading-recipes");
}
},
},
};
</script>

View File

@ -23,8 +23,14 @@
<script>
export default {
props: {
buttonText: String,
value: String,
buttonText: {
type: String,
default: "Choose a color",
},
value: {
type: String,
default: "#ff0000",
},
},
data() {
return {

View File

@ -200,7 +200,8 @@ const icons = {
accountPlusOutline: mdiAccountPlusOutline,
};
export default ({ app }, inject) => {
// eslint-disable-next-line no-empty-pattern
export default ({}, inject) => {
// Inject $hello(msg) in Vue, context and store.
inject("globals", { icons });
};

View File

@ -4,7 +4,7 @@ import { store } from "@/store";
// TODO: Migrate to Mixins
export const utils = {
recipe: recipe,
recipe,
generateUniqueKey(item, index) {
return `${item}-${index}`;
},
@ -16,35 +16,35 @@ export const utils = {
return `${year}-${month}-${day}`;
},
notify: {
info: function(text, title = null) {
info(text, title = null) {
store.commit("setSnackbar", {
open: true,
title: title,
text: text,
title,
text,
color: "info",
});
},
success: function(text, title = null) {
success(text, title = null) {
store.commit("setSnackbar", {
open: true,
title: title,
text: text,
title,
text,
color: "success",
});
},
error: function(text, title = null) {
error(text, title = null) {
store.commit("setSnackbar", {
open: true,
title: title,
text: text,
title,
text,
color: "error",
});
},
warning: function(text, title = null) {
warning(text, title = null) {
store.commit("setSnackbar", {
open: true,
title: title,
text: text,
title,
text,
color: "warning",
});
},

View File

@ -6,8 +6,8 @@ export const recipe = {
*/
sortAToZ(list) {
list.sort((a, b) => {
var textA = a.name.toUpperCase();
var textB = b.name.toUpperCase();
const textA = a.name.toUpperCase();
const textB = b.name.toUpperCase();
return textA < textB ? -1 : textA > textB ? 1 : 0;
});
},
@ -42,7 +42,7 @@ const rand = n =>
Math.floor(Math.random() * n)
function swap(t, i, j) {
let q = t[i];
const q = t[i];
t[i] = t[j];
t[j] = q;
return t;