fix lints

This commit is contained in:
Lakee Sivaraya
2026-01-13 19:36:22 -08:00
parent a919816bff
commit 6605c887ed
5 changed files with 14 additions and 14 deletions

View File

@@ -96,14 +96,14 @@ function conditionsToFilter(conditions: FilterCondition[]): Record<string, any>
if (value === 'true') parsedValue = true
else if (value === 'false') parsedValue = false
else if (value === 'null') parsedValue = null
else if (!isNaN(Number(value)) && value !== '') parsedValue = Number(value)
else if (!Number.isNaN(Number(value)) && value !== '') parsedValue = Number(value)
else if (operator === 'in') {
parsedValue = value.split(',').map((v) => {
const trimmed = v.trim()
if (trimmed === 'true') return true
if (trimmed === 'false') return false
if (trimmed === 'null') return null
if (!isNaN(Number(trimmed)) && trimmed !== '') return Number(trimmed)
if (!Number.isNaN(Number(trimmed)) && trimmed !== '') return Number(trimmed)
return trimmed
})
}

View File

@@ -302,7 +302,7 @@ export function TableDataViewer() {
return (
<button
type='button'
className='cursor-pointer select-none text-left text-[12px] text-[var(--text-secondary)] underline decoration-[var(--border-1)] decoration-dotted underline-offset-2 transition-colors hover:decoration-[var(--text-muted)] hover:text-[var(--text-primary)]'
className='cursor-pointer select-none text-left text-[12px] text-[var(--text-secondary)] underline decoration-[var(--border-1)] decoration-dotted underline-offset-2 transition-colors hover:text-[var(--text-primary)] hover:decoration-[var(--text-muted)]'
onClick={(e) => handleCellClick(e, column.name, value, 'date')}
title='Click to view ISO format'
>
@@ -746,7 +746,7 @@ export function TableDataViewer() {
) : cellViewer?.type === 'date' ? (
<div className='m-[16px] space-y-[12px]'>
<div className='rounded-[6px] border border-[var(--border)] bg-[var(--surface-4)] p-[16px]'>
<div className='mb-[6px] text-[11px] font-medium uppercase tracking-wide text-[var(--text-tertiary)]'>
<div className='mb-[6px] font-medium text-[11px] text-[var(--text-tertiary)] uppercase tracking-wide'>
Formatted
</div>
<div className='text-[14px] text-[var(--text-primary)]'>
@@ -765,7 +765,7 @@ export function TableDataViewer() {
</div>
</div>
<div className='rounded-[6px] border border-[var(--border)] bg-[var(--surface-4)] p-[16px]'>
<div className='mb-[6px] text-[11px] font-medium uppercase tracking-wide text-[var(--text-tertiary)]'>
<div className='mb-[6px] font-medium text-[11px] text-[var(--text-tertiary)] uppercase tracking-wide'>
ISO Format
</div>
<div className='font-mono text-[13px] text-[var(--text-secondary)]'>

View File

@@ -133,8 +133,8 @@ export function CreateTableModal({ isOpen, onClose }: CreateTableModalProps) {
<ModalContent className='w-[700px]'>
<ModalHeader>
<div className='flex flex-col gap-[4px]'>
<h2 className='text-[16px] font-semibold'>Create New Table</h2>
<p className='text-[13px] font-normal text-[var(--text-tertiary)]'>
<h2 className='font-semibold text-[16px]'>Create New Table</h2>
<p className='font-normal text-[13px] text-[var(--text-tertiary)]'>
Define your table schema with columns and constraints
</p>
</div>
@@ -149,7 +149,7 @@ export function CreateTableModal({ isOpen, onClose }: CreateTableModalProps) {
{/* Table Name */}
<div className='flex flex-col gap-[8px]'>
<Label htmlFor='tableName' className='text-[13px] font-medium'>
<Label htmlFor='tableName' className='font-medium text-[13px]'>
Table Name*
</Label>
<Input
@@ -167,7 +167,7 @@ export function CreateTableModal({ isOpen, onClose }: CreateTableModalProps) {
{/* Description */}
<div className='flex flex-col gap-[8px]'>
<Label htmlFor='description' className='text-[13px] font-medium'>
<Label htmlFor='description' className='font-medium text-[13px]'>
Description
</Label>
<Textarea
@@ -185,7 +185,7 @@ export function CreateTableModal({ isOpen, onClose }: CreateTableModalProps) {
{/* Columns */}
<div className='flex flex-col gap-[14px]'>
<div className='flex items-center justify-between'>
<Label className='text-[13px] font-medium'>Columns*</Label>
<Label className='font-medium text-[13px]'>Columns*</Label>
<Button
type='button'
size='sm'
@@ -199,7 +199,7 @@ export function CreateTableModal({ isOpen, onClose }: CreateTableModalProps) {
</div>
{/* Column Headers */}
<div className='flex items-center gap-[10px] rounded-[6px] bg-[var(--bg-secondary)] px-[12px] py-[8px] text-[11px] font-semibold text-[var(--text-tertiary)]'>
<div className='flex items-center gap-[10px] rounded-[6px] bg-[var(--bg-secondary)] px-[12px] py-[8px] font-semibold text-[11px] text-[var(--text-tertiary)]'>
<div className='flex-1'>Column Name</div>
<div className='w-[110px]'>Type</div>
<div className='w-[70px] text-center'>Required</div>

View File

@@ -115,7 +115,7 @@ export function SortFormat({
return (
<div className='flex flex-col gap-[8px]'>
{conditions.length === 0 ? (
<div className='flex items-center justify-center rounded-[4px] border border-dashed border-[var(--border-1)] py-[16px]'>
<div className='flex items-center justify-center rounded-[4px] border border-[var(--border-1)] border-dashed py-[16px]'>
<Button variant='ghost' size='sm' onClick={addCondition} disabled={isReadOnly}>
<Plus className='mr-[4px] h-[12px] w-[12px]' />
Add sort condition

View File

@@ -50,7 +50,7 @@ function parseValue(value: string, operator: string): any {
if (value === 'true') return true
if (value === 'false') return false
if (value === 'null') return null
if (!isNaN(Number(value)) && value !== '') return Number(value)
if (!Number.isNaN(Number(value)) && value !== '') return Number(value)
if (operator === 'in') {
return value.split(',').map((v) => {
@@ -58,7 +58,7 @@ function parseValue(value: string, operator: string): any {
if (trimmed === 'true') return true
if (trimmed === 'false') return false
if (trimmed === 'null') return null
if (!isNaN(Number(trimmed)) && trimmed !== '') return Number(trimmed)
if (!Number.isNaN(Number(trimmed)) && trimmed !== '') return Number(trimmed)
return trimmed
})
}