From 59d5dd06f7aa134f872eac7d34e206e641e3a85d Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw Date: Fri, 13 Oct 2023 15:28:06 +0530 Subject: [PATCH 1/5] feat(linters): no ban types --- .eslintrc.json | 1 - src/components/basic/MultiSelectList/index.tsx | 5 ++++- .../basic/Notifications/Snackbar/PageSnackbarStack.tsx | 2 +- src/components/basic/SelectList/index.tsx | 2 +- src/components/basic/StaticTable/types.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5983922c..e61a5c29 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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": 0, "@typescript-eslint/no-extra-semi": 0, diff --git a/src/components/basic/MultiSelectList/index.tsx b/src/components/basic/MultiSelectList/index.tsx index 93025381..cd89f009 100644 --- a/src/components/basic/MultiSelectList/index.tsx +++ b/src/components/basic/MultiSelectList/index.tsx @@ -36,6 +36,9 @@ export interface PartsType { text: string highlight: boolean } +export interface IHashMap { + [item: string]: T +} export interface MultiSelectListProps extends Omit { @@ -50,7 +53,7 @@ export interface MultiSelectListProps buttonAddMore: string notItemsText: string tagSize?: TagSizeType - filterOptionsArgs?: {} + filterOptionsArgs?: IHashMap defaultValues?: any onAddItem: (items: any[]) => void } diff --git a/src/components/basic/Notifications/Snackbar/PageSnackbarStack.tsx b/src/components/basic/Notifications/Snackbar/PageSnackbarStack.tsx index 49aa0938..6c80f2c3 100644 --- a/src/components/basic/Notifications/Snackbar/PageSnackbarStack.tsx +++ b/src/components/basic/Notifications/Snackbar/PageSnackbarStack.tsx @@ -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) => { return ( { variant?: 'filled' clearText?: string noOptionsText?: string - defaultValue?: {} + defaultValue?: unknown disableClearable?: boolean onChangeItem: (items: any) => void } diff --git a/src/components/basic/StaticTable/types.ts b/src/components/basic/StaticTable/types.ts index 18123b3d..e5fad764 100644 --- a/src/components/basic/StaticTable/types.ts +++ b/src/components/basic/StaticTable/types.ts @@ -27,7 +27,7 @@ export interface TableType { icon: boolean inputValue?: string clickableLink?: string - isValid?: (value: string) => {} + isValid?: (value: string) => unknown errorMessage?: string }> > From 9b63df1fbd56a2e2c1db2819953187669736cb59 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw Date: Fri, 13 Oct 2023 15:35:04 +0530 Subject: [PATCH 2/5] v2.1.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e48cbd3..3f1e0c0c 100644 --- a/package.json +++ b/package.json @@ -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", From a4c5e5a38ae4398c347fbfa13e6b0d8ad1a0a311 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw Date: Fri, 13 Oct 2023 16:29:08 +0530 Subject: [PATCH 3/5] feat(linters): fix linters build error --- src/components/basic/MultiSelectList/index.tsx | 4 +--- src/components/basic/StaticTable/VerticalTable.tsx | 2 +- .../content/DemoComponents/ContentComponentsTypes.ts | 2 +- .../content/DemoComponents/components/RenderImage.tsx | 2 +- src/components/content/DemoComponents/index.tsx | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/basic/MultiSelectList/index.tsx b/src/components/basic/MultiSelectList/index.tsx index 43d00db6..bb8608df 100644 --- a/src/components/basic/MultiSelectList/index.tsx +++ b/src/components/basic/MultiSelectList/index.tsx @@ -36,9 +36,7 @@ export interface PartsType { text: string highlight: boolean } -export interface IHashMap { - [item: string]: T -} +export type IHashMap = Record; export interface MultiSelectListProps extends Omit { diff --git a/src/components/basic/StaticTable/VerticalTable.tsx b/src/components/basic/StaticTable/VerticalTable.tsx index 3d059cfc..46261f0f 100644 --- a/src/components/basic/StaticTable/VerticalTable.tsx +++ b/src/components/basic/StaticTable/VerticalTable.tsx @@ -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('') diff --git a/src/components/content/DemoComponents/ContentComponentsTypes.ts b/src/components/content/DemoComponents/ContentComponentsTypes.ts index bc5cb6fd..c3d3ada4 100644 --- a/src/components/content/DemoComponents/ContentComponentsTypes.ts +++ b/src/components/content/DemoComponents/ContentComponentsTypes.ts @@ -87,7 +87,7 @@ export interface ProviderProps { sectionLink?: SectionLinkType subDescriptions?: SubDescriptionData subsections?: SubSectionsType[] - scrollTop?: any + scrollTop?: () => void } export enum TemplateNames { diff --git a/src/components/content/DemoComponents/components/RenderImage.tsx b/src/components/content/DemoComponents/components/RenderImage.tsx index f9e7a421..1b7b0564 100644 --- a/src/components/content/DemoComponents/components/RenderImage.tsx +++ b/src/components/content/DemoComponents/components/RenderImage.tsx @@ -28,7 +28,7 @@ export const RenderImage = ({ width = 'auto', }: { url: string - additionalStyles?: any + additionalStyles?: React.CSSProperties, height?: string width?: string }) => { diff --git a/src/components/content/DemoComponents/index.tsx b/src/components/content/DemoComponents/index.tsx index e6e8632a..64da2ae2 100644 --- a/src/components/content/DemoComponents/index.tsx +++ b/src/components/content/DemoComponents/index.tsx @@ -228,7 +228,7 @@ export const ContentComponents = ({ sectionInfo, baseUrl, }: { - sectionInfo: any + sectionInfo: ProviderProps[] baseUrl: string }) => { const [showScroll, setShowScroll] = useState(false) From b9c5a8f11e4b27b68a90cb81ea38e6ee4968beff Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Mon, 16 Oct 2023 09:33:10 +0200 Subject: [PATCH 4/5] chore(changelog): fix changelog messages --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ceff2ec..f20de730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Changelog +## 2.1.7 + +- Linter findings + - Fix ban-types + ## 2.1.6 - Migrate MUI data grid to v6 -- Linters - - Fix ban-types ## 2.1.5 From 742807363f3ab393cee0db9de4ef0aa41ce6dc0a Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Mon, 16 Oct 2023 09:35:47 +0200 Subject: [PATCH 5/5] chore(deps): update DEPENDENCIES --- DEPENDENCIES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index c97b7710..6a3be115 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -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