fix(scripts): resolve lint and typecheck errors in utility scripts
All checks were successful
ci/woodpecker/push/web Pipeline was successful
All checks were successful
ci/woodpecker/push/web Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ async function main() {
|
|||||||
if (seen.has(doc.id as number)) continue
|
if (seen.has(doc.id as number)) continue
|
||||||
seen.add(doc.id as number)
|
seen.add(doc.id as number)
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const currentFilename = (doc as any).filename as string
|
const currentFilename = (doc as any).filename as string
|
||||||
if (currentFilename === r.newFile) {
|
if (currentFilename === r.newFile) {
|
||||||
console.log(` ↷ id=${doc.id} already named ${r.newFile}`)
|
console.log(` ↷ id=${doc.id} already named ${r.newFile}`)
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ async function main() {
|
|||||||
if (ids['hero']) {
|
if (ids['hero']) {
|
||||||
console.log('\n── Updating Home hero image ─────────────────────────────')
|
console.log('\n── Updating Home hero image ─────────────────────────────')
|
||||||
const home = await payload.findGlobal({ slug: 'home', depth: 0 })
|
const home = await payload.findGlobal({ slug: 'home', depth: 0 })
|
||||||
const heroData = (home as Record<string, unknown>).hero as Record<string, unknown> | undefined
|
const heroData = (home as unknown as Record<string, unknown>).hero as Record<string, unknown> | undefined
|
||||||
await payload.updateGlobal({
|
await payload.updateGlobal({
|
||||||
slug: 'home',
|
slug: 'home',
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Reference in New Issue
Block a user