Skip to content

Commit 3ba5b31

Browse files
committed
refactor: fix eslint warnings
1 parent 9ed03fe commit 3ba5b31

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

packages/coreui-react/src/hooks/useForkedRef.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function assignRef<RefValueType = any>(
3838
} else {
3939
try {
4040
ref.current = value
41-
} catch (error) {
41+
} catch {
4242
throw new Error(`Cannot assign value "${value}" to ref "${ref}"`)
4343
}
4444
}

packages/docs/src/components/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { FC } from 'react'
22
import { Highlight } from 'prism-react-renderer'
33

44
interface CodeBlockProps {
5-
children: any
5+
children: any // eslint-disable-line @typescript-eslint/no-explicit-any
66
}
77

88
const CodeBlock: FC<CodeBlockProps> = ({ children }) => {

packages/docs/src/components/ScssDocs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const ScssDocs: FC = ({ file, capture }: { file: string; capture: string }) => {
2424
}
2525
`)
2626

27+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2728
const _file = data.allFile.edges.find((node: any) => node.node.relativePath === file)
2829
const captureStart = `// scss-docs-start ${capture}`
2930
const captureEnd = `// scss-docs-end ${capture}`

packages/docs/src/templates/DefaultLayout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { AppContext } from '../AppContext'
77
import { Script } from 'gatsby'
88

99
interface DefaultLayoutProps {
10-
children: any
11-
data: any
12-
pageContext: any
13-
path: any
10+
children: any // eslint-disable-line @typescript-eslint/no-explicit-any
11+
data: any // eslint-disable-line @typescript-eslint/no-explicit-any
12+
pageContext: any // eslint-disable-line @typescript-eslint/no-explicit-any
13+
path: any // eslint-disable-line @typescript-eslint/no-explicit-any
1414
}
1515

1616
const getPreferredTheme = (storedTheme: string | undefined) => {

packages/docs/src/templates/DocsLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { Ads, Banner, Seo, Toc } from '../components'
33
import { CCol, CContainer, CRow } from '@coreui/react/src/'
44

55
interface DocsLayoutProps {
6-
children: any
7-
data: any
8-
pageContext: any
6+
children: any // eslint-disable-line @typescript-eslint/no-explicit-any
7+
data: any // eslint-disable-line @typescript-eslint/no-explicit-any
8+
pageContext: any // eslint-disable-line @typescript-eslint/no-explicit-any
99
}
1010

1111
// @ts-expect-error json file

packages/docs/src/templates/MdxLayout.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ const MdxLayout: FC<MdxLayoutProps> = ({ children }) => {
1313
return (
1414
<MDXProvider
1515
components={{
16+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1617
ScssDocs: (props: any) => <ScssDocs {...props} />,
18+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1719
strong: (props: any) => {
1820
if (props.children.type == 'em') {
1921
const color = props.children.props.children.includes('Deprecated')
@@ -29,7 +31,9 @@ const MdxLayout: FC<MdxLayoutProps> = ({ children }) => {
2931
return <strong>{props.children}</strong>
3032
}
3133
},
34+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3235
pre: (props: any) => <CodeBlock {...props} />,
36+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3337
table: (props: any) => {
3438
// TODO: find better soultion
3539
const isApiTable =
@@ -43,6 +47,7 @@ const MdxLayout: FC<MdxLayoutProps> = ({ children }) => {
4347
/>
4448
)
4549
},
50+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4651
Callout: (props: any) => {
4752
const { children, title, ...rest } = props
4853
return (
@@ -52,6 +57,7 @@ const MdxLayout: FC<MdxLayoutProps> = ({ children }) => {
5257
</Callout>
5358
)
5459
},
60+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5561
Example: (props: any) => {
5662
const { children, ...rest } = props
5763
return (

0 commit comments

Comments
 (0)