Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
gtluszcz committed Sep 29, 2024
1 parent 54baacd commit c8f1caf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const chatResponseSchema = z.object({
declaration: z.record(z.unknown()),
})

type ChatResponse = z.infer<typeof chatResponseSchema>

type SuccessChatResponse = {
text: string
Expand Down Expand Up @@ -54,8 +53,6 @@ const transcribeResponseSchema = z.object({
transcription: z.string(),
})

type TranscribeResponse = z.infer<typeof transcribeResponseSchema>

type SuccessTranscribeResponse = {
text: string
}
Expand Down
21 changes: 10 additions & 11 deletions src/components/Declaration.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import { DeclarationInput } from '@/components/DeclarationInput'
import { DeclarationInputWrapper } from '@/components/DeclarationInputWrapper'
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
import { Input } from '@/components/ui/input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { Textarea } from '@/components/ui/textarea'
import { match } from '@/helpers/check'
import { noop } from '@/helpers/function'
import { cloneDeep } from '@/helpers/object'
import {
CelZlozenia,
MiejscePolozenia,
Expand All @@ -8,18 +17,8 @@ import {
TypSpolki,
} from '@/types'
import { motion } from 'framer-motion'
import { set } from 'lodash'
import { Dispatch, SetStateAction, useState } from 'react'
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
import { Input } from '@/components/ui/input'
import { Form } from '@/components/ui/form'
import { DeclarationInput } from '@/components/DeclarationInput'
import { get, set } from 'lodash'
import { DeclarationInputWrapper } from '@/components/DeclarationInputWrapper'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { cloneDeep } from '@/helpers/object'
import { match } from '@/helpers/check'
import { Textarea } from '@/components/ui/textarea'
import { noop } from '@/helpers/function'

type Props = {
show: boolean
Expand Down
1 change: 0 additions & 1 deletion src/components/DeclarationInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { DeclarationInputWrapper } from '@/components/DeclarationInputWrapper'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'

type Props = {
label: string
Expand Down
4 changes: 4 additions & 0 deletions src/helpers/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export function mapValues<TObject extends Record<string, any>, TReturn>(
for (const [key, value] of Object.entries(object)) {
assertSafeKey(key)

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
result[key] = mapper(value, key)
}

Expand All @@ -135,6 +137,8 @@ export function mergeWith<TObjectA extends Record<any, any>, TObjectB extends Re
for (const key of keys) {
assertSafeKey(key)

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
result[key] = mapper(objectA[key], objectB[key])
}

Expand Down

0 comments on commit c8f1caf

Please sign in to comment.