Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

1.4 KB
Raw Blame
import { ReactNode } from 'react'

import { Lint } from '@/data/lint/lint-query'
import { SHORTCUT_IDS, type ShortcutId } from '@/state/shortcuts/registry'

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' | 'health'
}

export const LINT_TABS: ReadonlyArray<{
  id: LINTER_LEVELS
  label: string
  description: string
  descriptionShort: string
  shortcutId: ShortcutId
}> = [
  {
    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',
    shortcutId: SHORTCUT_IDS.ADVISORS_TAB_ERRORS,
  },
  {
    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',
    shortcutId: SHORTCUT_IDS.ADVISORS_TAB_WARNINGS,
  },
  {
    id: LINTER_LEVELS.INFO,
    label: 'Info',
    description: 'You should read through these suggestions and consider implementing them.',
    descriptionShort: 'For consideration to implement',
    shortcutId: SHORTCUT_IDS.ADVISORS_TAB_INFO,
  },
]