Skip to content

Commit d27e1b5

Browse files
committed
styles: fix eslint warnings
1 parent b43e875 commit d27e1b5

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

packages/coreui-icons-react/src/__tests__/CIcon.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import CIcon from './../'
66
// import { cifAu } from './../../../icons/js/flag/cif-au'
77

88
describe('CIcon', () => {
9-
109
it('renders svg with class="icon"', () => {
1110
const { container } = render(<CIcon />)
1211
expect(container.firstChild).toHaveClass('icon')
@@ -19,7 +18,7 @@ describe('CIcon', () => {
1918
// })
2019

2120
it('renders svg with size', () => {
22-
const { container } = render(<CIcon size="xl"/>)
21+
const { container } = render(<CIcon size="xl" />)
2322
expect(container.firstChild).toHaveClass('icon-xl')
2423
})
2524

packages/coreui-react-chartjs/src/CChart.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ export const CChart = forwardRef<Chart | undefined, CChartProps>((props, ref) =>
160160
)
161161
}
162162

163+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
163164
const handleOnClick = (e: any) => {
164165
if (!chart) return
165166

@@ -195,6 +196,7 @@ export const CChart = forwardRef<Chart | undefined, CChartProps>((props, ref) =>
195196

196197
// copy values
197198
assign(chart.config.data, newChartData)
199+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
198200
chart.config.data.datasets = newDataSets.map((newDataSet: any) => {
199201
// given the new set, find it's current match
200202
const currentDataSet = find(

packages/coreui-react-chartjs/src/__tests__/CChart.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('<CChart />', () => {
2424
responsive: false,
2525
}
2626

27+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2728
let chart: any, update: any, destroy: any
2829
const ref = (el: Chart | null): void => {
2930
chart = el

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ export type AssignableRef<ValueType> =
99
}['bivarianceHack']
1010
| React.MutableRefObject<ValueType | null>
1111

12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1213
export function useForkedRef<RefValueType = any>(
1314
...refs: (AssignableRef<RefValueType> | null | undefined)[]
1415
) {
1516
return useMemo(() => {
1617
if (refs.every((ref) => ref == null)) {
1718
return null
1819
}
20+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1921
return (node: any) => {
2022
refs.forEach((ref) => {
2123
assignRef(ref, node)
@@ -24,8 +26,10 @@ export function useForkedRef<RefValueType = any>(
2426
}, refs)
2527
}
2628

29+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2730
export function assignRef<RefValueType = any>(
2831
ref: AssignableRef<RefValueType> | null | undefined,
32+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2933
value: any,
3034
) {
3135
if (ref == null) return
@@ -40,6 +44,7 @@ export function assignRef<RefValueType = any>(
4044
}
4145
}
4246

47+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
4348
export function isFunction(value: any): value is Function {
4449
return !!(value && {}.toString.call(value) == '[object Function]')
4550
}

packages/docs/src/plugins/gatsby-remark-import-markdown/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
'use strict'
23

34
const fs = require('fs')
@@ -34,7 +35,7 @@ module.exports = function (_ref, _temp) {
3435

3536
const code = fs.readFileSync(path, 'utf8')
3637

37-
const markdown = unified().use(parse).use(html, {sanitize: false})
38+
const markdown = unified().use(parse).use(html, { sanitize: false })
3839

3940
try {
4041
parent.value = `<div class=\"markdown\">${markdown.processSync(code)}</div>`

packages/docs/src/templates/Docs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const DocsLayout: FC = ({ data: { mdx } }) => {
3737
setSidebarVisible,
3838
}}
3939
>
40-
<Sidebar currentRoute={mdx.frontmatter.route}/>
40+
<Sidebar currentRoute={mdx.frontmatter.route} />
4141
<div className="wrapper d-flex flex-column min-vh-100">
4242
<Header />
4343
<div className="body flex-grow-1 px-3">

packages/docs/src/templates/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { FC } from 'react'
22
import PropTypes from 'prop-types'
33
import Helmet from 'react-helmet'
4-
import { Footer, Header, Seo, Sidebar } from './../components/'
4+
import { Footer, Header } from './../components/'
55
import './../styles/styles.scss'
66
import { CContainer } from '@coreui/react/src/index'
77

0 commit comments

Comments
 (0)