Linter.constants.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { ReactNode } from 'react'
  2. import { Lint } from '@/data/lint/lint-query'
  3. export enum LINTER_LEVELS {
  4. ERROR = 'ERROR',
  5. WARN = 'WARN',
  6. INFO = 'INFO',
  7. }
  8. export type LintInfo = {
  9. name: string
  10. title: string
  11. icon: ReactNode
  12. link: (args: { projectRef: string; metadata: Lint['metadata'] }) => string
  13. linkText: string
  14. docsLink: string
  15. category: 'security' | 'performance'
  16. }
  17. export const LINT_TABS = [
  18. {
  19. id: LINTER_LEVELS.ERROR,
  20. label: 'Errors',
  21. description: 'You should consider these issues urgent and fix them as soon as you can.',
  22. descriptionShort: 'Require immediate attention',
  23. },
  24. {
  25. id: LINTER_LEVELS.WARN,
  26. label: 'Warnings',
  27. description: 'You should try and read through these issues and fix them if necessary.',
  28. descriptionShort: 'To resolve only if necessary',
  29. },
  30. {
  31. id: LINTER_LEVELS.INFO,
  32. label: 'Info',
  33. description: 'You should read through these suggestions and consider implementing them.',
  34. descriptionShort: 'For consideration to implement',
  35. },
  36. ]