Skip to content

Commit d3cbc60

Browse files
committed
Fixed lint errors
1 parent 3df4cec commit d3cbc60

9 files changed

Lines changed: 15 additions & 13 deletions

File tree

src/lib/color/conversion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
type Culori,
2+
type Okhsl,
33
clampChroma,
44
convertHslToRgb,
55
convertRgbToHsl
@@ -29,7 +29,7 @@ export const rgbToSchemist = (
2929
color: RgbColor
3030
): SchemistColor => {
3131
const culoriRgb = rgbToCulori(color);
32-
const {h} = culoriRgbToOklch(culoriRgb);
32+
const {h = 0} = culoriRgbToOklch(culoriRgb);
3333
const {s, l} = culoriRgbToOkhsl(culoriRgb);
3434

3535
return {
@@ -46,7 +46,7 @@ export const schemistToRgb = ({
4646
l,
4747
a
4848
}: SchemistColor): RgbColor => {
49-
const hsl: Culori.Okhsl = {
49+
const hsl: Okhsl = {
5050
mode: 'okhsl',
5151
h,
5252
s: s / 100,

src/lib/color/simulation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import {
2-
type Culori,
2+
type Rgb,
33
filterDeficiencyDeuter,
44
filterDeficiencyProt,
55
filterDeficiencyTrit
66
} from 'culori/fn';
77
import {rgbFromCulori, rgbToCulori} from './culori';
88
import type {RgbColor} from './types';
99

10-
const protanomalyFilter = filterDeficiencyProt<Culori.Rgb>();
11-
const deuteranomalyFilter = filterDeficiencyDeuter<Culori.Rgb>();
12-
const tritanomalyFilter = filterDeficiencyTrit<Culori.Rgb>();
10+
const protanomalyFilter = filterDeficiencyProt();
11+
const deuteranomalyFilter = filterDeficiencyDeuter();
12+
const tritanomalyFilter = filterDeficiencyTrit();
1313

1414
export const simulateProtanomaly = (color: RgbColor) =>
1515
rgbFromCulori(protanomalyFilter(rgbToCulori(color)));

src/lib/components/Sample.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export let title: string = '';
44
</script>
55

6-
<span class="sample" style="background: {color};" {title} />
6+
<span class="sample" style="background: {color};" {title}></span>
77

88
<style>
99
span {

src/lib/components/export/CodeArea.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
border-radius: var(--radius);
1212
padding: 1rem;
1313
background: var(--bg-hard);
14+
color: var(--fg);
1415
font: inherit;
1516
font-family: var(--font-mono);
1617
resize: none;

src/lib/components/export/TableExport.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<table>
1616
<thead>
1717
<tr>
18-
<td />
18+
<td></td>
1919
<th>Name</th>
2020
<th>Value</th>
2121
</tr>

src/lib/components/forms/ColorField.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
: format === 'hsl'
9797
? HslColorField
9898
: LchColorField}
99-
{id}
99+
id={id as never}
100100
bind:value
101101
/>
102102

src/lib/components/forms/RangeInput.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<style>
2929
input {
30-
-webkit-appearance: none;
30+
appearance: none;
3131
width: 100%;
3232
height: 1rem;
3333
background: transparent;

src/lib/components/palette/Node.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@
6868
<div
6969
class="output"
7070
style="--output: {formatSchemist($output[0])};"
71-
/>
71+
></div>
7272

7373
<div class="self" class:open={areOptionsOpen}>
7474
<header>
7575
<div class="title">
7676
<h3 class="name">
7777
<div
7878
role="textbox"
79+
tabindex="-1"
7980
contenteditable="true"
8081
spellcheck="false"
8182
aria-label="Design token"

src/lib/utils/functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const debounce = <Fn extends (...args: any) => any>(
44
callback: Fn,
55
timeout: DebounceTimeout
66
) => {
7-
let timer: NodeJS.Timeout;
7+
let timer: number;
88

99
return (...args: Parameters<Fn>) => {
1010
clearTimeout(timer);

0 commit comments

Comments
 (0)