refactor(web): convert file-local Step enum to as-const in website crawlers 🤖🤖🤖 (#34565)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jean Ibarz
2026-04-20 03:41:32 +02:00
committed by GitHub
parent b351ab00a2
commit 26e50bb084
4 changed files with 18 additions and 24 deletions

View File

@@ -2449,9 +2449,6 @@
}
},
"web/app/components/datasets/create/website/firecrawl/index.tsx": {
"erasable-syntax-only/enums": {
"count": 1
},
"no-console": {
"count": 1
},
@@ -2468,9 +2465,6 @@
}
},
"web/app/components/datasets/create/website/jina-reader/index.tsx": {
"erasable-syntax-only/enums": {
"count": 1
},
"no-console": {
"count": 1
},
@@ -2487,9 +2481,6 @@
}
},
"web/app/components/datasets/create/website/watercrawl/index.tsx": {
"erasable-syntax-only/enums": {
"count": 1
},
"no-console": {
"count": 1
},

View File

@@ -27,11 +27,12 @@ type Props = {
crawlOptions: CrawlOptions
onCrawlOptionsChange: (payload: CrawlOptions) => void
}
enum Step {
init = 'init',
running = 'running',
finished = 'finished',
}
const Step = {
init: 'init',
running: 'running',
finished: 'finished',
} as const
type Step = typeof Step[keyof typeof Step]
type CrawlState = {
current: number
total: number

View File

@@ -27,11 +27,12 @@ type Props = {
crawlOptions: CrawlOptions
onCrawlOptionsChange: (payload: CrawlOptions) => void
}
enum Step {
init = 'init',
running = 'running',
finished = 'finished',
}
const Step = {
init: 'init',
running: 'running',
finished: 'finished',
} as const
type Step = typeof Step[keyof typeof Step]
const JinaReader: FC<Props> = ({ onPreview, checkedCrawlResult, onCheckedCrawlResultChange, onJobIdChange, crawlOptions, onCrawlOptionsChange }) => {
const { t } = useTranslation()
const [step, setStep] = useState<Step>(Step.init)

View File

@@ -27,11 +27,12 @@ type Props = {
crawlOptions: CrawlOptions
onCrawlOptionsChange: (payload: CrawlOptions) => void
}
enum Step {
init = 'init',
running = 'running',
finished = 'finished',
}
const Step = {
init: 'init',
running: 'running',
finished: 'finished',
} as const
type Step = typeof Step[keyof typeof Step]
const WaterCrawl: FC<Props> = ({ onPreview, checkedCrawlResult, onCheckedCrawlResultChange, onJobIdChange, crawlOptions, onCrawlOptionsChange }) => {
const { t } = useTranslation()
const [step, setStep] = useState<Step>(Step.init)