diff --git a/frontend/src/components/common/Resource/ResourceListView.tsx b/frontend/src/components/common/Resource/ResourceListView.tsx index d160914e8a4..08cc7f5c2e3 100644 --- a/frontend/src/components/common/Resource/ResourceListView.tsx +++ b/frontend/src/components/common/Resource/ResourceListView.tsx @@ -18,7 +18,7 @@ export interface ResourceListViewWithResourceClassProps } export default function ResourceListView( - props: ResourceListViewProps | ResourceListViewWithResourceClassProps, + props: ResourceListViewProps | ResourceListViewWithResourceClassProps ) { const { title, children, headerProps, ...tableProps } = props; const withNamespaceFilter = diff --git a/frontend/src/components/common/Resource/ResourceTable.tsx b/frontend/src/components/common/Resource/ResourceTable.tsx index 6dee439914c..28b96112f85 100644 --- a/frontend/src/components/common/Resource/ResourceTable.tsx +++ b/frontend/src/components/common/Resource/ResourceTable.tsx @@ -102,7 +102,7 @@ export interface ResourceTableFromResourceClassProps } export default function ResourceTable( - props: ResourceTableFromResourceClassProps | ResourceTableProps, + props: ResourceTableFromResourceClassProps | ResourceTableProps ) { if (!!(props as ResourceTableFromResourceClassProps).resourceClass) { const { resourceClass, ...otherProps } = props as ResourceTableFromResourceClassProps; @@ -228,11 +228,11 @@ function ResourceTableContent(props: ResourceTableProps) { const tableProcessors = useTypedSelector(state => state.resourceTable.tableColumnsProcessors); const defaultFilterFunc = useFilterFunc(); const [columnVisibility, setColumnVisibility] = useState(() => - initColumnVisibilityState(columns, id), + initColumnVisibilityState(columns, id) ); const [tableSettings] = useState<{ id: string; show: boolean }[]>( - !!id ? helpers.loadTableSettings(id) : [], + !!id ? helpers.loadTableSettings(id) : [] ); const [allColumns, sort] = useMemo(() => { diff --git a/frontend/src/components/common/Table/Table.stories.tsx b/frontend/src/components/common/Table/Table.stories.tsx index e43983f4a76..ef1c5495664 100644 --- a/frontend/src/components/common/Table/Table.stories.tsx +++ b/frontend/src/components/common/Table/Table.stories.tsx @@ -247,7 +247,7 @@ const TemplateWithFilter: StoryFn<{ state = { filter: { namespaces: new Set(), search: '' }, config: { settings: { tableRowsPerPageOptions: [10, 20, 50, 100] } }, - }, + } ) => state, preloadedState: { filter: { diff --git a/frontend/src/components/common/Table/Table.tsx b/frontend/src/components/common/Table/Table.tsx index 714427eb8b9..0eb3016ce46 100644 --- a/frontend/src/components/common/Table/Table.tsx +++ b/frontend/src/components/common/Table/Table.tsx @@ -93,7 +93,7 @@ export type TableProps> = Omit< function usePageURLState( key: string, prefix: string, - initialPage: number, + initialPage: number ): ReturnType { const [page, setPage] = useURLState(key, { defaultValue: initialPage + 1, prefix }); const [zeroIndexPage, setZeroIndexPage] = useState(page - 1); @@ -161,7 +161,7 @@ export default function Table>({ id: column.id ?? String(i), header: column.header || '', })), - [tableProps.columns], + [tableProps.columns] ); const tableData = useMemo(() => { diff --git a/frontend/src/components/node/List.tsx b/frontend/src/components/node/List.tsx index 22276e8b656..a495c644c9e 100644 --- a/frontend/src/components/node/List.tsx +++ b/frontend/src/components/node/List.tsx @@ -60,7 +60,7 @@ export default function NodeList() { gridTemplate: 'minmax(150px, .3fr)', getValue: node => { const isReady = !!node.status.conditions.find( - condition => condition.type === 'Ready' && condition.status === 'True', + condition => condition.type === 'Ready' && condition.status === 'True' ); return isReady ? t('translation|Yes') : t('translation|No'); }, diff --git a/frontend/src/components/pod/List.tsx b/frontend/src/components/pod/List.tsx index cb5a910e9ed..ab3ab70d36e 100644 --- a/frontend/src/components/pod/List.tsx +++ b/frontend/src/components/pod/List.tsx @@ -154,7 +154,7 @@ export function PodListRenderer(props: PodListProps) { } const statusTrueCount = Object.values(readinessGatesStatus).filter( - status => status === 'True', + status => status === 'True' ).length; return statusTrueCount; diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 3e108f6febd..61a9fcad3e0 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -23,13 +23,13 @@ async function loadAxe() { // https://github.com/microsoft/monaco-editor/issues/2448 results.violations = results.violations.filter( (v: any) => - !(v.id === 'landmark-unique' && v.nodes[0].html.indexOf('monaco-status') !== -1), + !(v.id === 'landmark-unique' && v.nodes[0].html.indexOf('monaco-status') !== -1) ); // tooltips have role="tooltip", but should be in a landmark. // This would need to be fixed within Material UI ToolTip component. results.violations = results.violations.filter( - (v: any) => !(v.id === 'region' && v.nodes[0].html.indexOf('role="tooltip"') !== -1), + (v: any) => !(v.id === 'region' && v.nodes[0].html.indexOf('role="tooltip"') !== -1) ); // Tooltips do an opacity transition, which causes a color contrast issue. @@ -37,7 +37,7 @@ async function loadAxe() { // The final tooltip contrast is fine. results.violations = results.violations.filter( (v: any) => - !(v.id === 'color-contrast' && v.nodes[0].html.indexOf('MuiTooltip-tooltip') !== -1), + !(v.id === 'color-contrast' && v.nodes[0].html.indexOf('MuiTooltip-tooltip') !== -1) ); return results; @@ -51,7 +51,7 @@ async function loadAxe() { alreadyWarned = true; alert( 'Accessibility issues found. See developer console. ' + - '`REACT_APP_SKIP_A11Y=false make run-frontend` to enable alert.', + '`REACT_APP_SKIP_A11Y=false make run-frontend` to enable alert.' ); } } diff --git a/frontend/src/lib/k8s/apiProxy.test.ts b/frontend/src/lib/k8s/apiProxy.test.ts index a2d70bcf4cd..e8a35106878 100644 --- a/frontend/src/lib/k8s/apiProxy.test.ts +++ b/frontend/src/lib/k8s/apiProxy.test.ts @@ -152,7 +152,7 @@ describe('apiProxy', () => { describe('singleApiFactory', () => { it('Successfully creates API client for single resource', async () => { const server = new WS( - `${wsUrl}clusters/${clusterName}/apis/${mockSingleResource[0]}/${mockSingleResource[1]}/${mockSingleResource[2]}`, + `${wsUrl}clusters/${clusterName}/apis/${mockSingleResource[0]}/${mockSingleResource[1]}/${mockSingleResource[2]}` ); const client = apiProxy.apiFactory(...mockSingleResource); @@ -177,7 +177,7 @@ describe('apiProxy', () => { const connections = mockMultipleResource.map(async ([group, version, resource]) => { const server = new WS( - `${wsUrl}clusters/${clusterName}/apis/${group}/${version}/${resource}`, + `${wsUrl}clusters/${clusterName}/apis/${group}/${version}/${resource}` ); const client = apiProxy.apiFactory(group, version, resource); client.list(cb, errCb, {}, clusterName); @@ -203,7 +203,7 @@ describe('apiProxy', () => { expect.assertions(4); const mockServer = new WS( - `${wsUrl}clusters/${clusterName}/apis/${mockSingleResource[0]}/${mockSingleResource[1]}/namespaces/${namespace}/${mockSingleResource[2]}`, + `${wsUrl}clusters/${clusterName}/apis/${mockSingleResource[0]}/${mockSingleResource[1]}/namespaces/${namespace}/${mockSingleResource[2]}` ); const client = apiProxy.apiFactoryWithNamespace(...mockSingleResource); @@ -229,7 +229,7 @@ describe('apiProxy', () => { const connections = mockMultipleResource.map(async ([group, version, resource]) => { const mockServer = new WS( - `${wsUrl}clusters/${clusterName}/apis/${group}/${version}/namespaces/${namespace}/${resource}`, + `${wsUrl}clusters/${clusterName}/apis/${group}/${version}/namespaces/${namespace}/${resource}` ); const client = apiProxy.apiFactoryWithNamespace(group, version, resource); client.list(namespace, cb, errCb, {}, clusterName); @@ -511,7 +511,7 @@ describe('apiProxy', () => { apiProxy.streamResultsForCluster( streamResultsUrl, { cb, errCb, cluster: clusterName }, - { watch: '1' }, + { watch: '1' } ); mockServer.on('connection', async (socket: any) => { @@ -537,7 +537,7 @@ describe('apiProxy', () => { apiProxy.streamResultsForCluster( streamResultsUrl, { cb, errCb, cluster: clusterName }, - { watch: '1' }, + { watch: '1' } ); mockServer.on('connection', async (socket: any) => { @@ -551,7 +551,7 @@ describe('apiProxy', () => { reason: errorMessage.object.reason, }), type: errorMessage.type, - }), + }) ); done(); }); @@ -565,7 +565,7 @@ describe('apiProxy', () => { .streamResultsForCluster( streamResultsUrl, { cb, errCb, cluster: clusterName }, - { watch: '1' }, + { watch: '1' } ) .then(cancel => { mockServer.on('connection', async socket => { diff --git a/frontend/src/lib/k8s/apiProxy.ts b/frontend/src/lib/k8s/apiProxy.ts index fb80ae058c7..e136b9060bd 100644 --- a/frontend/src/lib/k8s/apiProxy.ts +++ b/frontend/src/lib/k8s/apiProxy.ts @@ -305,7 +305,7 @@ export async function request( params: RequestParams = {}, autoLogoutOnAuthError: boolean = true, useCluster: boolean = true, - queryParams?: QueryParameters, + queryParams?: QueryParameters ): Promise { // @todo: This is a temporary way of getting the current cluster. We should improve it later. const cluster = (useCluster && getCluster()) || ''; @@ -339,7 +339,7 @@ export interface ClusterRequestParams extends RequestParams { export async function clusterRequest( path: string, params: ClusterRequestParams = {}, - queryParams?: QueryParameters, + queryParams?: QueryParameters ): Promise { interface RequestHeaders { Authorization?: string; @@ -1399,7 +1399,7 @@ async function connectStreamWithParams( path: string, cb: StreamResultsCb, onFail: () => void, - params?: StreamParams, + params?: StreamParams ): Promise<{ close: () => void; socket: WebSocket | null; diff --git a/frontend/src/lib/util.ts b/frontend/src/lib/util.ts index 3029c03756f..6a2c3d19550 100644 --- a/frontend/src/lib/util.ts +++ b/frontend/src/lib/util.ts @@ -391,7 +391,7 @@ export function useId(prefix = '') { const [id] = React.useState( import.meta.env.UNDER_TEST === 'true' ? prefix + 'id' - : prefix + Math.random().toString(16).slice(2), + : prefix + Math.random().toString(16).slice(2) ); return id; diff --git a/frontend/src/redux/filterSlice.ts b/frontend/src/redux/filterSlice.ts index 75e85b288bc..81f4fa96293 100644 --- a/frontend/src/redux/filterSlice.ts +++ b/frontend/src/redux/filterSlice.ts @@ -25,7 +25,7 @@ export function filterResource( item: KubeObjectInterface | KubeEvent, filter: FilterState, search?: string, - matchCriteria?: string[], + matchCriteria?: string[] ) { let matches: boolean = true; @@ -71,7 +71,7 @@ export function filterResource( export function filterGeneric( item: T, search?: string, - matchCriteria?: string[], + matchCriteria?: string[] ) { if (!search) { return true; diff --git a/frontend/src/storybook.test.tsx b/frontend/src/storybook.test.tsx index db4bdbf87e5..b519bb6b5cc 100644 --- a/frontend/src/storybook.test.tsx +++ b/frontend/src/storybook.test.tsx @@ -35,7 +35,7 @@ const compose = (entry: StoryFile) => { return composeStories(entry); } catch (e) { throw new Error( - `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}`, + `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}` ); } }; @@ -45,7 +45,7 @@ function getAllStoryFiles() { const storyFiles = Object.entries( import.meta.glob('./**/*.stories.tsx', { eager: true, - }), + }) ); return storyFiles.map(([filePath, storyFile]) => { @@ -86,7 +86,7 @@ getAllStoryFiles().forEach(({ storyFile, componentName, storyDir }) => { if (stories.length <= 0) { throw new Error( - `No stories found for this module: ${title}. Make sure there is at least one valid story for this module, without a disable parameter, or add parameters.storyshots.disable in the default export of this file.`, + `No stories found for this module: ${title}. Make sure there is at least one valid story for this module, without a disable parameter, or add parameters.storyshots.disable in the default export of this file.` ); } @@ -103,7 +103,7 @@ getAllStoryFiles().forEach(({ storyFile, componentName, storyDir }) => { const snapshotPath = path.join( storyDir, options.snapshotsDirName, - `${componentName}.${name}${options.snapshotExtension}`, + `${componentName}.${name}${options.snapshotExtension}` ); expect(asFragment()).toMatchFileSnapshot(snapshotPath); diff --git a/plugins/headlamp-plugin/bin/headlamp-plugin.js b/plugins/headlamp-plugin/bin/headlamp-plugin.js index 2d4e7de6d5c..d6a324683f4 100755 --- a/plugins/headlamp-plugin/bin/headlamp-plugin.js +++ b/plugins/headlamp-plugin/bin/headlamp-plugin.js @@ -283,7 +283,7 @@ function start() { console.warn( ' @kinvolk/headlamp-plugin is out of date. Run the following command to upgrade \n' + ` See release notes here: ${url}` + - ' npx @kinvolk/headlamp-plugin upgrade', + ' npx @kinvolk/headlamp-plugin upgrade' ); return; }