frontend: cleanup

* dummy commit

* cleanup workflows

* setup and run eslint

* add linter to CI

* use eslint for formatting

* reorder rules

* drop editor config
This commit is contained in:
Hayden 2022-09-09 14:46:53 -08:00 committed by GitHub
parent 78fa714297
commit 75c633dcb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 2048 additions and 641 deletions

View file

@ -1,11 +1,13 @@
<template>
<div class="form-control w-full" ref="menu">
<div ref="menu" class="form-control w-full">
<label class="label">
<span class="label-text">{{ label }}</span>
</label>
<div class="dropdown dropdown-top sm:dropdown-end">
<div tabindex="0" class="w-full min-h-[48px] flex gap-2 p-4 flex-wrap border border-gray-400 rounded-lg">
<span class="badge" v-for="itm in value"> {{ name != '' ? itm[name] : itm }} </span>
<span v-for="itm in value" :key="name != '' ? itm[name] : itm" class="badge">
{{ name != "" ? itm[name] : itm }}
</span>
</div>
<ul
tabindex="0"
@ -13,12 +15,13 @@
>
<li
v-for="(obj, idx) in items"
:key="idx"
:class="{
bordered: selectedIndexes[idx],
}"
>
<button type="button" @click="toggle(idx)">
{{ name != '' ? obj[name] : obj }}
{{ name != "" ? obj[name] : obj }}
</button>
</li>
</ul>
@ -27,11 +30,11 @@
</template>
<script lang="ts" setup>
const emit = defineEmits(['update:modelValue']);
const emit = defineEmits(["update:modelValue"]);
const props = defineProps({
label: {
type: String,
default: '',
default: "",
},
modelValue: {
type: Array as () => any[],
@ -43,7 +46,7 @@
},
name: {
type: String,
default: 'name',
default: "name",
},
selectFirst: {
type: Boolean,
@ -74,5 +77,5 @@
}
);
const value = useVModel(props, 'modelValue', emit);
const value = useVModel(props, "modelValue", emit);
</script>