mirror of
https://github.com/supabase/supabase.git
synced 2026-05-11 19:26:38 +08:00
## Problem While trying to update `react` to version `19`, I noticed type related errors that can be fixed in version `18`, mostly usage of `JSX.Element` instead of `ReactNode`. ## Solution - Use `ReactNode` instead of `JSX.Element` - Fix some invalid usage of `rechart` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Standardized React component type annotations across the codebase for improved type consistency and flexibility. * Updated component prop types to accept a broader range of renderable content. * **Bug Fixes** * Adjusted chart layout positioning to improve visual alignment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { ReactNode } from 'react'
|
|
|
|
import { Lint } from '@/data/lint/lint-query'
|
|
|
|
export enum LINTER_LEVELS {
|
|
ERROR = 'ERROR',
|
|
WARN = 'WARN',
|
|
INFO = 'INFO',
|
|
}
|
|
|
|
export type LintInfo = {
|
|
name: string
|
|
title: string
|
|
icon: ReactNode
|
|
link: (args: { projectRef: string; metadata: Lint['metadata'] }) => string
|
|
linkText: string
|
|
docsLink: string
|
|
category: 'security' | 'performance'
|
|
}
|
|
|
|
export const LINT_TABS = [
|
|
{
|
|
id: LINTER_LEVELS.ERROR,
|
|
label: 'Errors',
|
|
description: 'You should consider these issues urgent and fix them as soon as you can.',
|
|
descriptionShort: 'Require immediate attention',
|
|
},
|
|
{
|
|
id: LINTER_LEVELS.WARN,
|
|
label: 'Warnings',
|
|
description: 'You should try and read through these issues and fix them if necessary.',
|
|
descriptionShort: 'To resolve only if necessary',
|
|
},
|
|
{
|
|
id: LINTER_LEVELS.INFO,
|
|
label: 'Info',
|
|
description: 'You should read through these suggestions and consider implementing them.',
|
|
descriptionShort: 'For consideration to implement',
|
|
},
|
|
]
|