refactor(lint): linter auto fix

This commit is contained in:
Corentin Thomasset 2022-04-22 23:31:40 +02:00
parent 8e29a97404
commit 086d31eab5
No known key found for this signature in database
GPG key ID: DBD997E935996158
54 changed files with 1122 additions and 1503 deletions

View file

@ -1,9 +1,6 @@
<template>
<n-card>
<n-form
label-width="100"
label-placement="left"
>
<n-form label-width="100" label-placement="left">
<n-form-item label="color picker:">
<n-color-picker
v-model:value="hex"
@ -12,46 +9,25 @@
/>
</n-form-item>
<n-form-item label="color name:">
<input-copyable
v-model:value="name"
:on-input="(v: string) => onInputUpdated(v, 'name')"
/>
<input-copyable v-model:value="name" :on-input="(v: string) => onInputUpdated(v, 'name')" />
</n-form-item>
<n-form-item label="hex:">
<input-copyable
v-model:value="hex"
:on-input="(v: string) => onInputUpdated(v, 'hex')"
/>
<input-copyable v-model:value="hex" :on-input="(v: string) => onInputUpdated(v, 'hex')" />
</n-form-item>
<n-form-item label="rgb:">
<input-copyable
v-model:value="rgb"
:on-input="(v: string) => onInputUpdated(v, 'rgb')"
/>
<input-copyable v-model:value="rgb" :on-input="(v: string) => onInputUpdated(v, 'rgb')" />
</n-form-item>
<n-form-item label="hsl:">
<input-copyable
v-model:value="hsl"
:on-input="(v: string) => onInputUpdated(v, 'hsl')"
/>
<input-copyable v-model:value="hsl" :on-input="(v: string) => onInputUpdated(v, 'hsl')" />
</n-form-item>
<n-form-item label="hwb:">
<input-copyable
v-model:value="hwb"
:on-input="(v: string) => onInputUpdated(v, 'hwb')"
/>
<input-copyable v-model:value="hwb" :on-input="(v: string) => onInputUpdated(v, 'hwb')" />
</n-form-item>
<n-form-item label="lch:">
<input-copyable
v-model:value="lch"
:on-input="(v: string) => onInputUpdated(v, 'lch')"
/>
<input-copyable v-model:value="lch" :on-input="(v: string) => onInputUpdated(v, 'lch')" />
</n-form-item>
<n-form-item label="cmyk:">
<input-copyable
v-model:value="cmyk"
:on-input="(v: string) => onInputUpdated(v, 'cmyk')"
/>
<input-copyable v-model:value="cmyk" :on-input="(v: string) => onInputUpdated(v, 'cmyk')" />
</n-form-item>
</n-form>
</n-card>
@ -59,23 +35,23 @@
<script setup lang="ts">
import { ref } from 'vue';
import { colord, extend } from "colord";
import InputCopyable from "../../components/InputCopyable.vue";
import { colord, extend } from 'colord';
import InputCopyable from '../../components/InputCopyable.vue';
import cmykPlugin from "colord/plugins/cmyk";
import hwbPlugin from "colord/plugins/hwb";
import namesPlugin from "colord/plugins/names";
import lchPlugin from "colord/plugins/lch";
import cmykPlugin from 'colord/plugins/cmyk';
import hwbPlugin from 'colord/plugins/hwb';
import namesPlugin from 'colord/plugins/names';
import lchPlugin from 'colord/plugins/lch';
extend([cmykPlugin, hwbPlugin, namesPlugin, lchPlugin]);
const name = ref('')
const hex = ref('#1ea54cff')
const rgb = ref('')
const hsl = ref('')
const hwb = ref('')
const cmyk = ref('')
const lch = ref('')
const name = ref('');
const hex = ref('#1ea54cff');
const rgb = ref('');
const hsl = ref('');
const hwb = ref('');
const cmyk = ref('');
const lch = ref('');
function onInputUpdated(value: string, omit: string) {
const color = colord(value);
@ -89,6 +65,5 @@ function onInputUpdated(value: string, omit: string) {
if (omit !== 'lch') lch.value = color.toLchString();
}
onInputUpdated(hex.value, 'hex')
onInputUpdated(hex.value, 'hex');
</script>