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