Skip to content

Commit

Permalink
fix(linters): fix ban types linters
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo authored Oct 16, 2023
2 parents 426f4ac + 7428073 commit e1eb651
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 11 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"react/react-in-jsx-scope": 0,
"@typescript-eslint/comma-dangle": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-extra-semi": 0,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog


## 2.1.7

- Linter findings
- Fix ban-types

## 2.1.6

- Migrate MUI data grid to v6
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ npm/npmjs/-/fs-minipass/2.1.0, ISC, approved, clearlydefined
npm/npmjs/-/fs-monkey/1.0.4, Unlicense AND (ISC AND MIT), approved, #2964
npm/npmjs/-/fs.realpath/1.0.0, ISC, approved, clearlydefined
npm/npmjs/-/fsevents/2.3.2, MIT, approved, #2967
npm/npmjs/-/function-bind/1.1.1, MIT, approved, clearlydefined
npm/npmjs/-/function-bind/1.1.1, MIT, approved, #11063
npm/npmjs/-/function.prototype.name/1.1.5, MIT, approved, #10255
npm/npmjs/-/functions-have-names/1.2.3, MIT, approved, clearlydefined
npm/npmjs/-/gauge/3.0.2, ISC, approved, clearlydefined
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-shared-components",
"version": "2.1.6",
"version": "2.1.7",
"description": "Catena-X Portal Shared Components",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/basic/MultiSelectList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface PartsType {
text: string
highlight: boolean
}
export type IHashMap<T> = Record<string, T>;

export interface MultiSelectListProps
extends Omit<TextFieldProps, 'variant' | 'size'> {
Expand All @@ -50,7 +51,7 @@ export interface MultiSelectListProps
buttonAddMore: string
notItemsText: string
tagSize?: TagSizeType
filterOptionsArgs?: {}
filterOptionsArgs?: IHashMap<string>
defaultValues?: []
onAddItem: (items: []) => void
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Box } from '@mui/material'
import { type PropsWithChildren } from 'react'
import * as React from 'react'

export const PageSnackbarStack = ({ children }: PropsWithChildren<{}>) => {
export const PageSnackbarStack = ({ children }: PropsWithChildren<unknown>) => {
return (
<Box
sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/basic/SelectList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface SelectListProps extends Omit<TextFieldProps, 'variant'> {
variant?: 'filled'
clearText?: string
noOptionsText?: string
defaultValue?: {}
defaultValue?: unknown
disableClearable?: boolean
onChangeItem: (items: []) => void
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/basic/StaticTable/VerticalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const VerticalTable = ({
data: TableType
handleEdit?: (inputValue: string) => void
}) => {
const [inputField, setInputField] = useState<{row: {}, column: {}} | null>()
const [inputField, setInputField] = useState<{row: unknown, column: unknown} | null>()
const [inputValue, setInputValue] = useState('')
const [inputErrorMsg, setInputErrorMessage] = useState('')

Expand Down
2 changes: 1 addition & 1 deletion src/components/basic/StaticTable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface TableType {
icon: boolean
inputValue?: string
clickableLink?: string
isValid?: (value: string) => {}
isValid?: (value: string) => unknown
errorMessage?: string
}>
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface ProviderProps {
sectionLink?: SectionLinkType
subDescriptions?: SubDescriptionData
subsections?: SubSectionsType[]
scrollTop?: any
scrollTop?: () => void
}

export enum TemplateNames {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const RenderImage = ({
width = 'auto',
}: {
url: string
additionalStyles?: any
additionalStyles?: React.CSSProperties,
height?: string
width?: string
}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/DemoComponents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export const ContentComponents = ({
sectionInfo,
baseUrl,
}: {
sectionInfo: any
sectionInfo: ProviderProps[]
baseUrl: string
}) => {
const [showScroll, setShowScroll] = useState(false)
Expand Down

0 comments on commit e1eb651

Please sign in to comment.