diff --git a/components/author/index.tsx b/components/author/index.tsx index 5e324fb9..d6b51f2e 100644 --- a/components/author/index.tsx +++ b/components/author/index.tsx @@ -4,7 +4,7 @@ import { useAuthor } from './context'; interface NameProps { tagName?: keyof JSX.IntrinsicElements; - [key: string]: any; + [key: string]: unknown; } export const Name: React.FC = (props) => { @@ -22,7 +22,7 @@ export const Name: React.FC = (props) => { interface FirstNameProps { tagName?: keyof JSX.IntrinsicElements; - [key: string]: any; + [key: string]: unknown; } export const FirstName: React.FC = (props) => { @@ -34,7 +34,7 @@ export const FirstName: React.FC = (props) => { interface LastNameProps { tagName?: keyof JSX.IntrinsicElements; - [key: string]: any; + [key: string]: unknown; } export const LastName: React.FC = (props) => { @@ -54,7 +54,7 @@ function useDefaultAvatar() { } interface AvatarProps { - [key: string]: any; + [key: string]: unknown; } export const Avatar: React.FC = (props) => { @@ -71,7 +71,7 @@ export const Avatar: React.FC = (props) => { interface BioProps { tagName?: keyof JSX.IntrinsicElements; - [key: string]: any; + [key: string]: unknown; } export const Bio: React.FC = (props) => { @@ -82,7 +82,7 @@ export const Bio: React.FC = (props) => { }; interface EmailProps { - [key: string]: any; + [key: string]: unknown; } export const Email: React.FC = (props) => { diff --git a/components/post-author/index.tsx b/components/post-author/index.tsx index b25e8c17..282f2423 100644 --- a/components/post-author/index.tsx +++ b/components/post-author/index.tsx @@ -10,7 +10,7 @@ import type { Author } from '../author/context'; interface PostAuthorProps { children?: React.ReactNode | ((author: Author) => React.ReactNode); - [key: string]: any; + [key: string]: unknown; } export const PostAuthor: React.FC & { diff --git a/components/post-date/index.tsx b/components/post-date/index.tsx index 602d6e1a..315b1e6e 100644 --- a/components/post-date/index.tsx +++ b/components/post-date/index.tsx @@ -41,7 +41,7 @@ interface PostDateProps { /** * Remaining props to pass to the time element. */ - [key: string]: any; + [key: string]: unknown; } export const PostDate: React.FC = ({ placeholder = __('No date set', 'tenup'), format, ...rest}) => { diff --git a/components/post-meta/index.tsx b/components/post-meta/index.tsx index 49e25867..cfdbabc9 100644 --- a/components/post-meta/index.tsx +++ b/components/post-meta/index.tsx @@ -18,7 +18,7 @@ interface PostMetaProps { /** * Additional props to pass to the component. */ - [key: string]: any; + [key: string]: unknown; } export const PostMeta: React.FC & { diff --git a/hooks/use-block-parent-attributes/index.ts b/hooks/use-block-parent-attributes/index.ts index ac450088..57e17aff 100644 --- a/hooks/use-block-parent-attributes/index.ts +++ b/hooks/use-block-parent-attributes/index.ts @@ -18,7 +18,7 @@ export function useBlockParentAttributes() { const { updateBlockAttributes } = useDispatch(blockEditorStore); - const setParentAttributes = (attributes: {[key: string]: any}) => { + const setParentAttributes = (attributes: {[key: string]: unknown}) => { updateBlockAttributes(parentBlockClientId, attributes); };