fixes from template
This commit is contained in:
@@ -28,7 +28,7 @@ lint: node_modules ## lint code
|
|||||||
@$(BUN) run lint
|
@$(BUN) run lint
|
||||||
@$(BUN) run type-check
|
@$(BUN) run type-check
|
||||||
|
|
||||||
fix: node_modules ## fix and reformat code
|
format: node_modules ## fix and reformat code
|
||||||
@$(BUN) run format
|
@$(BUN) run format
|
||||||
@$(BUN) run lint-fix
|
@$(BUN) run lint-fix
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 0,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "vue-boilerplate",
|
"name": "vue-boilerplate",
|
||||||
|
|||||||
@@ -21,4 +21,10 @@ export default defineConfigWithVueTs(
|
|||||||
vueTsConfigs.strictTypeChecked,
|
vueTsConfigs.strictTypeChecked,
|
||||||
vueTsConfigs.stylisticTypeChecked,
|
vueTsConfigs.stylisticTypeChecked,
|
||||||
skipFormatting,
|
skipFormatting,
|
||||||
|
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
"no-console": "error",
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -106,7 +106,8 @@ watch(config, saveConfig, { deep: true });
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span v-if="slotTooBig" title="slot duration might be too big">
|
<span v-if="slotTooBig" title="slot duration might be too big">
|
||||||
<LucideIcon name="triangle-alert" /> {{ config.duration }} minutes
|
<LucideIcon name="triangle-alert" />
|
||||||
|
{{ config.duration }} minutes
|
||||||
</span>
|
</span>
|
||||||
<span v-else> {{ config.duration }} minutes </span>
|
<span v-else> {{ config.duration }} minutes </span>
|
||||||
</td>
|
</td>
|
||||||
@@ -144,13 +145,16 @@ watch(config, saveConfig, { deep: true });
|
|||||||
></textarea>
|
></textarea>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button @click="newVegetables"><LucideIcon name="dices" /></button>
|
<button @click="newVegetables">
|
||||||
|
<LucideIcon name="dices" />
|
||||||
|
</button>
|
||||||
<br />
|
<br />
|
||||||
<span
|
<span
|
||||||
v-if="candidates.length <= 2"
|
v-if="candidates.length <= 2"
|
||||||
title="not enough candidates"
|
title="not enough candidates"
|
||||||
>
|
>
|
||||||
<LucideIcon name="triangle-alert" /> <LucideIcon name="users-round" />
|
<LucideIcon name="triangle-alert" />
|
||||||
|
<LucideIcon name="users-round" />
|
||||||
{{ candidates.length }}
|
{{ candidates.length }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted } from "vue";
|
import { computed } from "vue";
|
||||||
import * as icons from "lucide-vue-next";
|
import * as icons from "lucide-vue-next";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -25,10 +25,6 @@ function kebab2camel(kebab: string): string {
|
|||||||
.join("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
console.log(kebab2camel(props.name));
|
|
||||||
});
|
|
||||||
|
|
||||||
// @ts-expect-error: cannot infer type of all exported data
|
// @ts-expect-error: cannot infer type of all exported data
|
||||||
const icon = computed(() => icons[kebab2camel(props.name)]);
|
const icon = computed(() => icons[kebab2camel(props.name)]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ export function getDataCookie<T extends object>(
|
|||||||
if (rawCookie.length) {
|
if (rawCookie.length) {
|
||||||
try {
|
try {
|
||||||
const parsedConfig = JSON.parse(rawCookie) as T;
|
const parsedConfig = JSON.parse(rawCookie) as T;
|
||||||
return { ...parsedConfig, ...defaultValue };
|
return { ...defaultValue, ...parsedConfig };
|
||||||
} catch {
|
} catch {
|
||||||
/* Empty */
|
/* Empty */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user