Skip to content

Commit 695dca1

Browse files
heiskrCopilot
andauthored
Remove no-explicit-any from CookBookFilter and translation correction (#61674)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ef059ac commit 695dca1

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

eslint.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,6 @@ export default [
236236
files: [
237237
'src/article-api/transformers/rest-transformer.ts',
238238
'src/frame/components/context/MainContext.tsx',
239-
'src/landings/components/CookBookFilter.tsx',
240-
'src/languages/lib/correct-translation-content.ts',
241239
],
242240
rules: {
243241
'@typescript-eslint/no-explicit-any': 'off',

src/landings/components/CookBookFilter.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TextInput, ActionMenu, ActionList, Button } from '@primer/react'
22
import { SearchIcon } from '@primer/octicons-react'
3-
import { useRef, useEffect, useState } from 'react'
3+
import { useRef, useEffect, useState, type ChangeEvent } from 'react'
44
import { ArticleCardItems } from '@/landings/types'
55
import { useTranslation } from '@/languages/components/useTranslation'
66

@@ -76,8 +76,7 @@ export const CookBookFilter = ({
7676
placeholder={t('search_articles')}
7777
ref={inputRef}
7878
autoComplete="false"
79-
// Using any because Primer React's TextInput doesn't export proper event types
80-
onChange={(e: any) => {
79+
onChange={(e: ChangeEvent<HTMLInputElement>) => {
8180
const query = e.target.value || ''
8281
onSearch(query)
8382
}}

src/languages/lib/correct-translation-content.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ interface CorrectionContext {
1212
code?: string
1313
dottedPath?: string
1414
relativePath?: string
15-
[key: string]: any
15+
skipOrphanStripping?: boolean
16+
[key: string]: unknown
1617
}
1718

1819
export function correctTranslatedContentStrings(

0 commit comments

Comments
 (0)