diff options
Diffstat (limited to 'server/sonar-web/src/main/js/app')
66 files changed, 175 insertions, 169 deletions
diff --git a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx index ab8cfaa9868..8ee5d08687c 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx @@ -69,7 +69,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta fetchNavigationSettings = () => { getSettingsNavigation().then( (r) => this.setState({ adminPages: r.extensions }), - () => {} + () => {}, ); }; @@ -80,7 +80,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta this.setState({ pendingPlugins }); } }, - () => {} + () => {}, ); }; @@ -94,7 +94,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta } } }, - () => {} + () => {}, ); }; @@ -106,7 +106,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta window.location.reload(); } }, - () => {} + () => {}, ); }; @@ -127,7 +127,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta defer={false} titleTemplate={translateWithParameters( 'page_title.template.with_category', - translate('layout.settings') + translate('layout.settings'), )} /> <SettingsNav diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx index 920eaee6ac6..ba21badbec4 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx @@ -134,7 +134,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { if (shouldRedirectToDashboard && this.props.location.pathname.includes('tutorials')) { this.props.router.replace(getProjectUrl(key)); } - } + }, ); this.fetchStatus(componentWithQualifier.key); @@ -159,7 +159,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { newTasksInProgress, currentTask, newCurrentTask, - component + component, ); shouldRedirectToDashboard = @@ -171,7 +171,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { this.watchStatusTimer = window.setTimeout( () => this.fetchStatus(componentKey), - FETCH_STATUS_WAIT_TIME + FETCH_STATUS_WAIT_TIME, ); } @@ -187,11 +187,11 @@ export class ComponentContainer extends React.PureComponent<Props, State> { if (shouldFetchComponent) { this.fetchComponent(shouldRedirectToDashboard); } - } + }, ); } }, - () => {} + () => {}, ); }; @@ -202,7 +202,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { this.props.hasFeature(Feature.BranchSupport) ) { const projectBindingErrors = await validateProjectAlmBinding(component.key).catch( - () => undefined + () => undefined, ); if (this.mounted) { @@ -243,17 +243,17 @@ export class ComponentContainer extends React.PureComponent<Props, State> { newTasksInProgress: Task[], currentTask: Task | undefined, newCurrentTask: Task | undefined, - component: Component | undefined + component: Component | undefined, ) => { const progressHasChanged = Boolean( tasksInProgress && (newTasksInProgress.length !== tasksInProgress.length || - differenceBy(newTasksInProgress, tasksInProgress, 'id').length > 0) + differenceBy(newTasksInProgress, tasksInProgress, 'id').length > 0), ); const currentTaskHasChanged = Boolean( (!currentTask && newCurrentTask) || - (currentTask && newCurrentTask && currentTask.id !== newCurrentTask.id) + (currentTask && newCurrentTask && currentTask.id !== newCurrentTask.id), ); if (progressHasChanged) { @@ -275,7 +275,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { needsAnotherCheck = ( shouldFetchComponent: boolean, component: Component | undefined, - newTasksInProgress: Task[] + newTasksInProgress: Task[], ) => { return ( !shouldFetchComponent && @@ -336,7 +336,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { defer={false} titleTemplate={translateWithParameters( 'page_title.template.with_instance', - component?.name ?? '' + component?.name ?? '', )} /> {component && @@ -351,7 +351,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> { isPending={isPending} projectBindingErrors={projectBindingErrors} />, - this.portalAnchor + this.portalAnchor, )} {loading ? ( <div className="page page-limited"> diff --git a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx index 0fafaea3e73..e7dc987b52d 100644 --- a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx +++ b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx @@ -62,7 +62,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) { <FormattedMessage id="settings.authentication.github.synchronization_successful.with_warning" defaultMessage={translate( - 'settings.authentication.github.synchronization_successful.with_warning' + 'settings.authentication.github.synchronization_successful.with_warning', )} values={{ date: formattedDate, @@ -76,7 +76,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) { ) : ( translateWithParameters( 'settings.authentication.github.synchronization_successful', - formattedDate + formattedDate, ) )} </i> @@ -109,7 +109,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) { <> {translateWithParameters( 'settings.authentication.github.synchronization_successful', - formattedDate + formattedDate, )} <br /> {summary ?? ''} @@ -119,7 +119,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) { <div> {translateWithParameters( 'settings.authentication.github.synchronization_failed', - formattedDate + formattedDate, )} </div> <br /> @@ -160,7 +160,7 @@ function GitHubSynchronisationWarning({ short }: GitHubSynchronisationWarningPro translate( data.nextSync.status === TaskStatuses.Pending ? 'settings.authentication.github.synchronization_pending' - : 'settings.authentication.github.synchronization_in_progress' + : 'settings.authentication.github.synchronization_in_progress', )} </Alert> diff --git a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx index 802c786c127..abcf9c142c4 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx @@ -67,7 +67,7 @@ export default function GlobalContainer() { className={classNames('page-wrapper', { 'new-background': TEMP_PAGELIST_WITH_NEW_BACKGROUND.includes(location.pathname), 'white-background': TEMP_PAGELIST_WITH_NEW_BACKGROUND_WHITE.includes( - location.pathname + location.pathname, ), })} id="container" diff --git a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx index 617d182c9ff..4d352ee5a05 100644 --- a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx +++ b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx @@ -115,7 +115,7 @@ function renderShortcuts(list: Shortcuts) { <code key={k} className="little-spacer-right"> {k} </code> - ) + ), )} </td> <td>{translate('keyboard_shortcuts', category, action)}</td> diff --git a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx index 99dd74100d9..3d210044326 100644 --- a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx +++ b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx @@ -77,7 +77,7 @@ export function SonarLintConnection({ currentUser }: Props) { const newTokenName = await getNextAvailableTokenName(login, `${TOKEN_PREFIX}-${ideName}`); const expirationDate = await computeExpirationDate(); const token = await generateToken({ name: newTokenName, login, expirationDate }).catch( - () => undefined + () => undefined, ); if (!token) { diff --git a/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx index e8f00fce9f9..5e68eadb3f6 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx @@ -51,6 +51,6 @@ function renderApp(props: Partial<App['props']> = {}) { }, })} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx index d3ba659c70d..e37b2475bc6 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx @@ -87,7 +87,7 @@ it('should render the component nav correctly for portfolio', async () => { expect(await ui.portfolioTitle.find()).toHaveAttribute('href', '/portfolio?id=portfolioKey'); expect(ui.issuesPageLink.get()).toHaveAttribute( 'href', - '/project/issues?id=portfolioKey&resolved=false' + '/project/issues?id=portfolioKey&resolved=false', ); expect(ui.measuresPageLink.get()).toHaveAttribute('href', '/component_measures?id=portfolioKey'); expect(ui.activityPageLink.get()).toHaveAttribute('href', '/project/activity?id=portfolioKey'); @@ -119,7 +119,7 @@ it('should render the component nav correctly for projects', async () => { expect(ui.overviewPageLink.get()).toHaveAttribute('href', '/dashboard?id=project-key'); expect(ui.issuesPageLink.get()).toHaveAttribute( 'href', - '/project/issues?id=project-key&resolved=false' + '/project/issues?id=project-key&resolved=false', ); expect(ui.hotspotsPageLink.get()).toHaveAttribute('href', '/security_hotspots?id=project-key'); expect(ui.measuresPageLink.get()).toHaveAttribute('href', '/component_measures?id=project-key'); @@ -359,7 +359,7 @@ describe('should correctly validate the project binding depending on the context renderComponentContainerAsComponent({ hasFeature: jest.fn().mockReturnValue(true) }); expect( - await screen.findByText('component_navigation.pr_deco.error_detected_X', { exact: false }) + await screen.findByText('component_navigation.pr_deco.error_detected_X', { exact: false }), ).toBeInTheDocument(); }); }); @@ -389,7 +389,7 @@ it.each([ await waitFor(() => { expect(validateProjectAlmBinding).not.toHaveBeenCalled(); }); - } + }, ); function renderComponentContainerAsComponent(props: Partial<Props> = {}) { @@ -402,7 +402,7 @@ function renderComponentContainerAsComponent(props: Partial<Props> = {}) { router={mockRouter()} {...props} /> - </> + </>, ); } @@ -438,7 +438,7 @@ function TestComponent() { breadcrumbs: [ { key: 'portfolioKey', name: 'portfolio', qualifier: ComponentQualifier.Portfolio }, ], - }) + }), ) } type="button" diff --git a/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx index 45d78f8cba9..c71bb5549a0 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx @@ -29,7 +29,7 @@ it('should redirect to static doc for specific version', async () => { expect(await screen.findByRole('link')).toHaveAttribute( 'href', - 'https://docs.sonarsource.com/sonarqube/10.0/land' + 'https://docs.sonarsource.com/sonarqube/10.0/land', ); }); @@ -38,7 +38,7 @@ it('should redirect to static doc for latest version', async () => { expect(await screen.findByRole('link')).toHaveAttribute( 'href', - 'https://docs.sonarsource.com/sonarqube/latest/land' + 'https://docs.sonarsource.com/sonarqube/latest/land', ); }); @@ -46,6 +46,6 @@ function renderDocumentationRedirect(navigate: string, version?: string) { renderAppRoutes( `documentation/${navigate}`, () => <Route path="/documentation/*" element={<DocumentationRedirect />} />, - { appState: mockAppState({ version }) } + { appState: mockAppState({ version }) }, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx index 9f16d2bcf5c..5ccfbc0b61b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx @@ -67,7 +67,7 @@ it('should show the db warning message', () => { function renderGlobalFooter( props: Partial<FCProps<typeof GlobalFooter>> = {}, - appStateOverride: Partial<AppState> = {} + appStateOverride: Partial<AppState> = {}, ) { return renderComponent(<GlobalFooter {...props} />, '/', { appState: mockAppState({ diff --git a/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx index 0ef752c29be..1c815988f4f 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx @@ -64,7 +64,7 @@ function renderKeyboardShortcutsModal() { <> <KeyboardShortcutsModal /> <input type="text" /> - </> + </>, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx index d04c07c03f2..7a7a5bd6c4e 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx @@ -63,7 +63,7 @@ it('should render correctly if system is starting', () => { renderMigrationContainer(); expect( - byText('/maintenance?return_to=%2Fprojects%3Fquery%3Dtoto%23hash').get() + byText('/maintenance?return_to=%2Fprojects%3Fquery%3Dtoto%23hash').get(), ).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx index 89711a0edba..568ee6fbbb2 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx @@ -32,7 +32,7 @@ function Child() { it('should render correctly for an user that does not have access to all children', () => { renderNonAdminPagesContainer( - mockComponent({ qualifier: ComponentQualifier.Application, canBrowseAllChildProjects: false }) + mockComponent({ qualifier: ComponentQualifier.Application, canBrowseAllChildProjects: false }), ); expect(screen.getByText('application.cannot_access_all_child_projects1')).toBeInTheDocument(); }); @@ -52,6 +52,6 @@ function renderNonAdminPagesContainer(component: Component) { </Route> </Routes> </MemoryRouter> - </ComponentContext.Provider> + </ComponentContext.Provider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx index 4d5a81df5a4..6d55922119d 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx @@ -91,7 +91,7 @@ function renderPluginRiskConsent(props: Partial<PluginRiskConsentProps> = {}) { currentUser={mockLoggedInUser({ permissions: { global: ['admin'] } })} router={mockRouter()} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx index 90095b105b1..6d6823bf780 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx @@ -69,7 +69,7 @@ it('should add item to history', () => { RecentHistory.add('bar', 'Bar', 'VW'); expect(save).toHaveBeenCalledWith( 'sonar_recent_history', - JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history]) + JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history]), ); }); @@ -82,7 +82,7 @@ it('should keep 10 items maximum', () => { RecentHistory.add('bar', 'Bar', 'VW'); expect(save).toHaveBeenCalledWith( 'sonar_recent_history', - JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history.slice(0, 9)]) + JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history.slice(0, 9)]), ); }); @@ -95,6 +95,6 @@ it('should remove component from history', () => { RecentHistory.remove('key-5'); expect(save).toHaveBeenCalledWith( 'sonar_recent_history', - JSON.stringify([...history.slice(0, 5), ...history.slice(6)]) + JSON.stringify([...history.slice(0, 5), ...history.slice(6)]), ); }); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx index e091c590e08..20e9dd54c1c 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx @@ -74,13 +74,13 @@ it('should allow the user to accept the binding request', async () => { renderSonarLintConnection(); expect( - await screen.findByRole('heading', { name: 'sonarlint-connection.request.title' }) + await screen.findByRole('heading', { name: 'sonarlint-connection.request.title' }), ).toBeInTheDocument(); await user.click(screen.getByRole('button', { name: 'sonarlint-connection.request.action' })); expect( - await screen.findByText('sonarlint-connection.success.description', { exact: false }) + await screen.findByText('sonarlint-connection.success.description', { exact: false }), ).toBeInTheDocument(); }); @@ -91,11 +91,11 @@ it('should handle token generation errors', async () => { renderSonarLintConnection(); await user.click( - await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }) + await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }), ); expect( - await screen.findByText('sonarlint-connection.token-error.description') + await screen.findByText('sonarlint-connection.token-error.description'), ).toBeInTheDocument(); }); @@ -106,11 +106,11 @@ it('should handle connection errors', async () => { renderSonarLintConnection(); await user.click( - await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }) + await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }), ); expect( - await screen.findByText('sonarlint-connection.connection-error.description') + await screen.findByText('sonarlint-connection.connection-error.description'), ).toBeInTheDocument(); const tokenValue = tokenMock.getLastToken()?.token ?? ''; @@ -129,11 +129,11 @@ it('should let the user copy the token if the port is not valid', async () => { renderSonarLintConnection({ port: '' }); await user.click( - await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }) + await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }), ); expect( - await screen.findByText('sonarlint-connection.connection-error.description') + await screen.findByText('sonarlint-connection.connection-error.description'), ).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx index 06f745cb907..2c217be2caf 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx @@ -95,7 +95,7 @@ function renderStartupModal(props: Partial<StartupModal['props']> = {}) { {...props} > <div /> - </StartupModal> + </StartupModal>, ); } diff --git a/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx index 429b0d4a1e9..6b7f29c9879 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx @@ -97,6 +97,6 @@ function renderSystemAnnouncement() { return renderComponent( <AvailableFeaturesContext.Provider value={[Feature.Announcement]}> <SystemAnnouncement /> - </AvailableFeaturesContext.Provider> + </AvailableFeaturesContext.Provider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx b/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx index ab133277074..b241258efb5 100644 --- a/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx +++ b/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx @@ -22,7 +22,7 @@ import { useOutletContext } from 'react-router-dom'; import { AdminPagesContext } from '../../../types/admin'; export default function withAdminPagesOutletContext( - WrappedComponent: React.ComponentType<AdminPagesContext> + WrappedComponent: React.ComponentType<AdminPagesContext>, ) { return function WithAdminPagesOutletContext() { const { adminPages } = useOutletContext<AdminPagesContext>(); diff --git a/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx b/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx index 5bd6de482ce..1dc86de5a8c 100644 --- a/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx +++ b/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx @@ -27,7 +27,7 @@ export interface WithAppStateContextProps { } export default function withAppStateContext<P>( - WrappedComponent: React.ComponentType<P & WithAppStateContextProps> + WrappedComponent: React.ComponentType<P & WithAppStateContextProps>, ) { return class WithAppStateContext extends React.PureComponent< Omit<P, keyof WithAppStateContextProps> diff --git a/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx b/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx index d39af4f151c..d81dc252fd0 100644 --- a/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx +++ b/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx @@ -27,7 +27,7 @@ export interface WithAvailableFeaturesProps { } export default function withAvailableFeatures<P>( - WrappedComponent: React.ComponentType<P & WithAvailableFeaturesProps> + WrappedComponent: React.ComponentType<P & WithAvailableFeaturesProps>, ) { return class WithAvailableFeatures extends React.PureComponent< Omit<P, keyof WithAvailableFeaturesProps> diff --git a/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx b/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx index 606967b9318..8d5049869d9 100644 --- a/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx +++ b/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx @@ -23,7 +23,7 @@ import { ComponentContextShape } from '../../../types/component'; import { ComponentContext } from './ComponentContext'; export default function withComponentContext<P extends Partial<ComponentContextShape>>( - WrappedComponent: React.ComponentType<P> + WrappedComponent: React.ComponentType<P>, ) { return class WithComponentContext extends React.PureComponent< Omit<P, keyof ComponentContextShape> diff --git a/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx b/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx index 9f0e85ba96d..c3695f1f88e 100644 --- a/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx +++ b/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx @@ -22,7 +22,7 @@ import { getWrappedDisplayName } from '../../../components/hoc/utils'; import { CurrentUserContext, CurrentUserContextInterface } from './CurrentUserContext'; export default function withCurrentUserContext<P>( - WrappedComponent: React.ComponentType<P & Pick<CurrentUserContextInterface, 'currentUser'>> + WrappedComponent: React.ComponentType<P & Pick<CurrentUserContextInterface, 'currentUser'>>, ) { return class WithCurrentUserContext extends React.PureComponent< Omit<P, 'currentUser' | 'updateCurrentUserHomepage' | 'updateDismissedNotices'> diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx index 179d690caa9..816fb52b78e 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx @@ -138,5 +138,5 @@ class Extension extends React.PureComponent<ExtensionProps, State> { } export default injectIntl( - withRouter(withTheme(withAppStateContext(withCurrentUserContext(withQueryClient(Extension))))) + withRouter(withTheme(withAppStateContext(withCurrentUserContext(withQueryClient(Extension))))), ); diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx index 26ed70a56e9..80b73bbab9b 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx @@ -35,7 +35,7 @@ export default function ProjectAdminPageExtension() { component && component.configuration && (component.configuration.extensions || []).find( - (p) => p.key === `${pluginKey}/${extensionKey}` + (p) => p.key === `${pluginKey}/${extensionKey}`, ); return extension ? ( diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx index 647e202f81d..08db46404c1 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx @@ -54,7 +54,7 @@ beforeAll(() => { </button> </div> ); - } + }, ); getEnhancedWindow().registerExtension( @@ -66,7 +66,7 @@ beforeAll(() => { el.innerHTML = ''; }; } - } + }, ); getEnhancedWindow().registerExtension('second-extension', () => { @@ -87,7 +87,7 @@ it('should render React extensions correctly', async () => { await user.click(screen.getByRole('button', { name: 'Click first react' })); expect( - await screen.findByRole('button', { name: 'Click first react change' }) + await screen.findByRole('button', { name: 'Click first react change' }), ).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx index 828ccc4fe37..ec2959b6ec6 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx @@ -56,7 +56,7 @@ it('should find the extension from props', () => { function renderGlobalPageExtension( navigateTo: string, globalPages: Extension[] = [], - params?: GlobalPageExtensionProps['params'] + params?: GlobalPageExtensionProps['params'], ) { renderApp(`extension/:pluginKey/:extensionKey`, <GlobalPageExtension params={params} />, { appState: mockAppState({ globalPages }), diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx index 5d7ed345ae8..4125d6e6dcb 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx @@ -39,7 +39,7 @@ it('should render correctly when the extension is found', () => { mockComponent({ configuration: { extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }, }), - { pluginKey: 'pluginId', extensionKey: 'extensionId' } + { pluginKey: 'pluginId', extensionKey: 'extensionId' }, ); expect(getExtensionStart).toHaveBeenCalledWith('pluginId/extensionId'); }); @@ -47,7 +47,7 @@ it('should render correctly when the extension is found', () => { it('should render correctly when the extension is not found', () => { renderProjectAdminPageExtension( mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }), - { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' } + { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' }, ); expect(screen.getByText('page_not_found')).toBeInTheDocument(); }); @@ -57,7 +57,7 @@ function renderProjectAdminPageExtension( params: { extensionKey: string; pluginKey: string; - } + }, ) { const { pluginKey, extensionKey } = params; const queryClient = new QueryClient(); @@ -74,6 +74,6 @@ function renderProjectAdminPageExtension( </ComponentContext.Provider> </IntlProvider> </HelmetProvider> - </QueryClientProvider> + </QueryClientProvider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx index d61aeee9739..d606f15c3fb 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx @@ -50,7 +50,7 @@ it('should not render when no component is passed', () => { it('should render correctly when the extension is found', async () => { renderProjectPageExtension( mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }), - { params: { pluginKey: 'pluginId', extensionKey: 'extensionId' } } + { params: { pluginKey: 'pluginId', extensionKey: 'extensionId' } }, ); await waitFor(() => expect(getExtensionStart).toHaveBeenCalledWith('pluginId/extensionId')); }); @@ -58,14 +58,14 @@ it('should render correctly when the extension is found', async () => { it('should render correctly when the extension is not found', async () => { renderProjectPageExtension( mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }), - { params: { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' } } + { params: { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' } }, ); expect(await screen.findByText('page_not_found')).toBeInTheDocument(); }); function renderProjectPageExtension( component?: Component, - props?: Partial<ProjectPageExtensionProps> + props?: Partial<ProjectPageExtensionProps>, ) { const queryClient = new QueryClient(); return render( @@ -89,6 +89,6 @@ function renderProjectPageExtension( </ComponentContext.Provider> </IntlProvider> </HelmetProvider> - </QueryClientProvider> + </QueryClientProvider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx index fb1ef0017e3..8eb9dbffc42 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx @@ -66,7 +66,7 @@ export default function GlobalSearchResults(props: Props): React.ReactElement<Pr )} <ItemDivider /> </ul> - </li> + </li>, ); } }); diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts index 1840a9178a9..2c330531e55 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts @@ -70,7 +70,7 @@ export default class IndexationNotificationHelper { static shouldDisplayCompletedNotification() { return JSON.parse( - get(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED) || false.toString() + get(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED) || false.toString(), ); } } diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx index db92ceaf415..58c1cd912bf 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx @@ -87,7 +87,7 @@ function renderCompletedWithFailureBanner() { values={{ link: renderBackgroundTasksPageLink( true, - translate('indexation.completed_with_error.link') + translate('indexation.completed_with_error.link'), ), }} /> @@ -113,7 +113,7 @@ function renderInProgressBanner(completedCount: number, total: number) { {translateWithParameters( 'indexation.progression', completedCount.toString(), - total.toString() + total.toString(), )} </span> @@ -150,12 +150,12 @@ function renderInProgressWithFailureBanner(completedCount: number, total: number defaultMessage={translateWithParameters( 'indexation.progression_with_error', completedCount.toString(), - total.toString() + total.toString(), )} values={{ link: renderBackgroundTasksPageLink( true, - translate('indexation.progression_with_error.link') + translate('indexation.progression_with_error.link'), ), }} /> diff --git a/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx b/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx index f59a04ab525..b0581903a65 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx @@ -45,7 +45,7 @@ export class PageUnavailableDueToIndexation extends React.PureComponent<WithInde <span className="sw-ml-1"> <FormattedMessage defaultMessage={translate( - 'indexation.page_unavailable.description.additional_information' + 'indexation.page_unavailable.description.additional_information', )} id="indexation.page_unavailable.description.additional_information" values={{ diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx index 71e9474b659..0c7d1eb9e2a 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx @@ -70,7 +70,7 @@ function renderIndexationContextProvider(props?: IndexationContextProviderProps) return renderComponent( <IndexationContextProvider appState={mockAppState({ needIssueSync: true, ...props?.appState })}> <TestComponent /> - </IndexationContextProvider> + </IndexationContextProvider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx index da8f78d54f1..0c379cdae0f 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx @@ -43,7 +43,7 @@ describe('Completed banner', () => { indexationContext={{ status: { completedCount: 23, hasFailures: false, isCompleted: true, total: 42 }, }} - /> + />, ); expect(IndexationNotificationHelper.shouldDisplayCompletedNotification).toHaveBeenCalled(); @@ -100,7 +100,7 @@ describe('Completed banner', () => { indexationContext={{ status: { completedCount: 23, hasFailures: true, isCompleted: false, total: 42 }, }} - /> + />, ); expect(byText('indexation.progression_with_error').get()).toBeInTheDocument(); @@ -111,7 +111,7 @@ describe('Completed banner', () => { indexationContext={{ status: { completedCount: 23, hasFailures: true, isCompleted: true, total: 42 }, }} - /> + />, ); expect(byText('indexation.completed_with_error').get()).toBeInTheDocument(); }); @@ -131,7 +131,7 @@ describe('Completed banner', () => { indexationContext={{ status: { completedCount: 23, hasFailures: false, isCompleted: true, total: 42 }, }} - /> + />, ); expect(IndexationNotificationHelper.shouldDisplayCompletedNotification).toHaveBeenCalled(); }); @@ -156,6 +156,6 @@ function renderIndexationNotification(props?: Partial<IndexationNotification['pr status: { completedCount: 23, hasFailures: false, isCompleted: false, total: 42 }, }} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx index c58dc4927da..b2a3116c2ae 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx @@ -46,7 +46,7 @@ it('should not refresh the page once the indexation is complete if there were fa indexationContext={{ status: { hasFailures: true, isCompleted: true }, }} - /> + />, ); expect(reload).not.toHaveBeenCalled(); @@ -69,7 +69,7 @@ it('should refresh the page once the indexation is complete if there were NO fai indexationContext={{ status: { hasFailures: false, isCompleted: true }, }} - /> + />, ); expect(reload).toHaveBeenCalled(); @@ -81,6 +81,6 @@ function renderPageUnavailableToIndexation() { indexationContext={{ status: { completedCount: 23, hasFailures: false, isCompleted: false, total: 42 }, }} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx index 4d11c97021d..9b18b56b785 100644 --- a/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx @@ -44,7 +44,7 @@ function renderLanguagesContextProvider() { return renderComponent( <LanguagesContextProvider> <Consumer /> - </LanguagesContextProvider> + </LanguagesContextProvider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx b/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx index 02a5d7cccd3..f12107b3a52 100644 --- a/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx +++ b/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx @@ -27,7 +27,7 @@ export interface WithLanguagesContextProps { } export default function withLanguagesContext<P>( - WrappedComponent: React.ComponentType<P & WithLanguagesContextProps> + WrappedComponent: React.ComponentType<P & WithLanguagesContextProps>, ) { return class WithLanguagesContext extends React.PureComponent< Omit<P, keyof WithLanguagesContextProps> diff --git a/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx index 589ccd31d03..5fb127a1118 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx @@ -45,7 +45,7 @@ function renderMetricsContextProvider() { return renderComponent( <MetricsContextProvider> <Consumer /> - </MetricsContextProvider> + </MetricsContextProvider>, ); } diff --git a/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx b/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx index 178259642a7..e17c3247762 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx @@ -27,7 +27,7 @@ export interface WithMetricsContextProps { } export default function withMetricsContext<P>( - WrappedComponent: React.ComponentType<P & WithMetricsContextProps> + WrappedComponent: React.ComponentType<P & WithMetricsContextProps>, ) { return class WithMetricsContext extends React.PureComponent< Omit<P, keyof WithMetricsContextProps> diff --git a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisLicenseError.tsx b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisLicenseError.tsx index 0c4e6f66c85..f855dbff147 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisLicenseError.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisLicenseError.tsx @@ -43,7 +43,7 @@ export function AnalysisLicenseError(props: Props) { <> {translateWithParameters( 'component_navigation.status.last_blocked_due_to_bad_license_X', - translate('qualifier', currentTask.componentQualifier ?? ComponentQualifier.Project) + translate('qualifier', currentTask.componentQualifier ?? ComponentQualifier.Project), )} </> ); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx index f4d5ad90e94..0ce833f0bba 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx @@ -31,7 +31,7 @@ export interface ComponentNavProjectBindingErrorNotifProps { } export default function ComponentNavProjectBindingErrorNotif( - props: ComponentNavProjectBindingErrorNotifProps + props: ComponentNavProjectBindingErrorNotifProps, ) { const { component } = props; let action; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx index d011f9d949e..03d341ff571 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx @@ -80,7 +80,7 @@ export function Menu(props: Props) { }; const isGovernanceEnabled = extensions.some((extension) => - extension.key.startsWith('governance/') + extension.key.startsWith('governance/'), ); const getQuery = (): Query => { @@ -93,7 +93,7 @@ export function Menu(props: Props) { <Tooltip overlay={translateWithParameters( 'layout.all_project_must_be_accessible', - translate('qualifier', qualifier) + translate('qualifier', qualifier), )} > <a aria-disabled="true" className="disabled-link"> @@ -211,7 +211,7 @@ export function Menu(props: Props) { } const hasSecurityReportsEnabled = extensions.some((extension) => - extension.key.startsWith('securityreport/') + extension.key.startsWith('securityreport/'), ); if (!hasSecurityReportsEnabled) { @@ -237,7 +237,7 @@ export function Menu(props: Props) { query, isProject(qualifier), isApplication(qualifier), - isPortfolioLike(qualifier) + isPortfolioLike(qualifier), ); if (!adminLinks.some((link) => link != null)) { return null; @@ -273,7 +273,7 @@ export function Menu(props: Props) { query: Query, isProject: boolean, isApplication: boolean, - isPortfolio: boolean + isPortfolio: boolean, ) => { return [ renderSettingsLink(query, isApplication, isPortfolio), @@ -524,7 +524,7 @@ export function Menu(props: Props) { const query = getQuery(); const withoutSecurityExtension = extensions.filter( (extension) => - !extension.key.startsWith('securityreport/') && !extension.key.startsWith('governance/') + !extension.key.startsWith('securityreport/') && !extension.key.startsWith('governance/'), ); if (withoutSecurityExtension.length === 0) { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx index c7adb1be843..932aac817eb 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx @@ -47,7 +47,7 @@ it('should work for errors on Pull Requests', async () => { currentTask: mockTask({ pullRequest: '01', pullRequestTitle: 'Fix stuff' }), }, undefined, - 'pullRequest=01&id=my-project' + 'pullRequest=01&id=my-project', ); expect(await screen.findByText(/component_navigation.status.failed_X/)).toBeInTheDocument(); @@ -68,7 +68,7 @@ it('should explain to admins how to get the staktrace', () => { { component: mockComponent({ configuration: { showBackgroundTasks: true } }), }, - 'project/background_tasks' + 'project/background_tasks', ); expect(screen.getByText(/component_navigation.status.failed_X.admin.help/)).toBeInTheDocument(); @@ -78,7 +78,7 @@ it('should explain to admins how to get the staktrace', () => { function renderAnalysisErrorMessage( overrides: Partial<Parameters<typeof AnalysisErrorMessage>[0]> = {}, location = '/', - params?: string + params?: string, ) { return renderApp( location, @@ -88,6 +88,6 @@ function renderAnalysisErrorMessage( onLeave={jest.fn()} {...overrides} />, - { navigateTo: params ? `/?${params}` : undefined, featureList: [Feature.BranchSupport] } + { navigateTo: params ? `/?${params}` : undefined, featureList: [Feature.BranchSupport] }, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisLicenseError-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisLicenseError-test.tsx index 5405df2ec92..6eb2a8a6167 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisLicenseError-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisLicenseError-test.tsx @@ -36,8 +36,8 @@ it('should handle a valid license', async () => { expect( await screen.findByText( - 'component_navigation.status.last_blocked_due_to_bad_license_X.qualifier.TRK' - ) + 'component_navigation.status.last_blocked_due_to_bad_license_X.qualifier.TRK', + ), ).toBeInTheDocument(); }); @@ -59,18 +59,18 @@ it('should send provide a link to the admin', async () => { { currentTask: mockTask({ errorMessage, errorType: 'error-type' }), }, - true + true, ); expect( - await screen.findByText('license.component_navigation.button.error-type.') + await screen.findByText('license.component_navigation.button.error-type.'), ).toBeInTheDocument(); expect(screen.getByText(errorMessage)).toBeInTheDocument(); }); function renderAnalysisLicenseError( overrides: Partial<Parameters<typeof AnalysisLicenseError>[0]> = {}, - canAdmin = false + canAdmin = false, ) { return renderApp('/', <AnalysisLicenseError currentTask={mockTask()} {...overrides} />, { appState: mockAppState({ canAdmin }), diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx index a3b5a039a84..b184d09f82a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx @@ -30,21 +30,21 @@ import ComponentNav, { ComponentNavProps } from '../ComponentNav'; it('renders correctly when there is a background task in progress', () => { renderComponentNav({ isInProgress: true }); expect( - screen.getByText('project_navigation.analysis_status.in_progress', { exact: false }) + screen.getByText('project_navigation.analysis_status.in_progress', { exact: false }), ).toBeInTheDocument(); }); it('renders correctly when there is a background task pending', () => { renderComponentNav({ isPending: true }); expect( - screen.getByText('project_navigation.analysis_status.pending', { exact: false }) + screen.getByText('project_navigation.analysis_status.pending', { exact: false }), ).toBeInTheDocument(); }); it('renders correctly when there is a failing background task', () => { renderComponentNav({ currentTask: mockTask({ status: TaskStatuses.Failed }) }); expect( - screen.getByText('project_navigation.analysis_status.failed', { exact: false }) + screen.getByText('project_navigation.analysis_status.failed', { exact: false }), ).toBeInTheDocument(); }); @@ -53,7 +53,7 @@ it('renders correctly when the project binding is incorrect', () => { projectBindingErrors: mockProjectAlmBindingConfigurationErrors(), }); expect( - screen.getByText('component_navigation.pr_deco.error_detected_X', { exact: false }) + screen.getByText('component_navigation.pr_deco.error_detected_X', { exact: false }), ).toBeInTheDocument(); }); @@ -73,6 +73,6 @@ function renderComponentNav(props: Partial<ComponentNavProps> = {}) { isInProgress={false} isPending={false} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx index 2ec27b6f16a..9e111dc4d2e 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx @@ -32,7 +32,7 @@ it('should not show a link if use is not allowed', () => { expect( screen.queryByRole('link', { name: 'component_navigation.pr_deco.action.check_project_settings', - }) + }), ).not.toBeInTheDocument(); }); @@ -41,14 +41,16 @@ it('should show a link if use is allowed', () => { component: mockComponent({ configuration: { showSettings: true } }), }); expect( - screen.getByRole('link', { name: 'component_navigation.pr_deco.action.check_project_settings' }) + screen.getByRole('link', { + name: 'component_navigation.pr_deco.action.check_project_settings', + }), ).toBeInTheDocument(); }); function renderComponentNavProjectBindingErrorNotif( - props: Partial<ComponentNavProjectBindingErrorNotifProps> = {} + props: Partial<ComponentNavProjectBindingErrorNotifProps> = {}, ) { return renderComponent( - <ComponentNavProjectBindingErrorNotif component={mockComponent()} {...props} /> + <ComponentNavProjectBindingErrorNotif component={mockComponent()} {...props} />, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx index 0d22beda1d8..48962968102 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx @@ -51,7 +51,7 @@ it('should render correctly when there is only 1 branch', async () => { expect(await screen.findByLabelText('help-tooltip')).toBeInTheDocument(); expect(screen.getByText('project')).toBeInTheDocument(); expect( - await screen.findByRole('button', { name: 'master overview.quality_gate_x.OK' }) + await screen.findByRole('button', { name: 'master overview.quality_gate_x.OK' }), ).toBeDisabled(); }); @@ -60,7 +60,7 @@ it('should render correctly when there are multiple branch', async () => { renderHeader(); expect( - await screen.findByRole('button', { name: 'main overview.quality_gate_x.OK' }) + await screen.findByRole('button', { name: 'main overview.quality_gate_x.OK' }), ).toBeEnabled(); expect(screen.queryByLabelText('help-tooltip')).not.toBeInTheDocument(); @@ -70,19 +70,19 @@ it('should render correctly when there are multiple branch', async () => { expect( screen.getByRole('menuitem', { name: '03 – TEST-193 dumb commit overview.quality_gate_x.ERROR ERROR', - }) + }), ).toBeInTheDocument(); expect( screen.getByRole('menuitem', { name: '01 – TEST-191 update master overview.quality_gate_x.OK OK', - }) + }), ).toBeInTheDocument(); expect( - screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }) + screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }), ).toBeInTheDocument(); await user.click( - screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }) + screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }), ); expect(screen.getByText('/dashboard?branch=normal-branch&id=header-project')).toBeInTheDocument(); }); @@ -102,7 +102,7 @@ it('should show manage branch and pull request button for admin', async () => { expect(screen.getByRole('link', { name: 'branch_like_navigation.manage' })).toBeInTheDocument(); expect(screen.getByRole('link', { name: 'branch_like_navigation.manage' })).toHaveAttribute( 'href', - '/project/branches?id=header-project' + '/project/branches?id=header-project', ); }); @@ -113,7 +113,7 @@ it('should render favorite button if the user is logged in', async () => { await user.click(screen.getByRole('button', { name: 'favorite.action.TRK.add' })); expect( - await screen.findByRole('button', { name: 'favorite.action.TRK.remove' }) + await screen.findByRole('button', { name: 'favorite.action.TRK.remove' }), ).toBeInTheDocument(); await user.click(screen.getByRole('button', { name: 'favorite.action.TRK.remove' })); @@ -130,12 +130,12 @@ it.each([['github'], ['gitlab'], ['bitbucket'], ['azure']])( currentUser: mockLoggedInUser(), }, undefined, - 'pullRequest=1001&id=compa' + 'pullRequest=1001&id=compa', ); const image = await screen.findByAltText(alm); expect(image).toBeInTheDocument(); expect(image).toHaveAttribute('src', `/images/alm/${alm}.svg`); - } + }, ); it('should show the correct help tooltip for applications', async () => { @@ -167,20 +167,20 @@ it('should show the correct help tooltip when branch support is not enabled', as { currentUser: mockLoggedInUser(), }, - [] + [], ); expect( - await screen.findByText('branch_like_navigation.no_branch_support.title.mr') + await screen.findByText('branch_like_navigation.no_branch_support.title.mr'), ).toBeInTheDocument(); expect( - screen.getByText('branch_like_navigation.no_branch_support.content_x.mr.alm.gitlab') + screen.getByText('branch_like_navigation.no_branch_support.content_x.mr.alm.gitlab'), ).toBeInTheDocument(); }); function renderHeader( props?: Partial<HeaderProps>, featureList = [Feature.BranchSupport], - params?: string + params?: string, ) { return renderApp( '/', @@ -192,6 +192,6 @@ function renderHeader( currentUser={mockCurrentUser()} {...props} />, - { featureList, navigateTo: params ? `/?id=header-project&${params}` : '/?id=header-project' } + { featureList, navigateTo: params ? `/?id=header-project&${params}` : '/?id=header-project' }, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/HeaderMeta-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/HeaderMeta-test.tsx index 3530de943b6..83d99549942 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/HeaderMeta-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/HeaderMeta-test.tsx @@ -51,7 +51,7 @@ it('should render correctly for a branch with warnings', async () => { expect(await screen.findByText('version_x.0.0.1')).toBeInTheDocument(); expect( - await screen.findByText('project_navigation.analysis_status.warnings') + await screen.findByText('project_navigation.analysis_status.warnings'), ).toBeInTheDocument(); await user.click(screen.getByText('project_navigation.analysis_status.details_link')); @@ -94,7 +94,7 @@ it('should render correctly for a pull request', async () => { renderHeaderMeta({}, undefined, 'pullRequest=01&id=my-project'); expect( - await screen.findByText('branch_like_navigation.for_merge_into_x_from_y') + await screen.findByText('branch_like_navigation.for_merge_into_x_from_y'), ).toBeInTheDocument(); expect(screen.queryByText('version_x.0.0.1')).not.toBeInTheDocument(); }); @@ -109,7 +109,7 @@ it('should render correctly when the user is not logged in', () => { function renderHeaderMeta( props: Partial<HeaderMetaProps> = {}, currentUser: CurrentUser = mockLoggedInUser(), - params?: string + params?: string, ) { return renderApp('/', <HeaderMeta component={mockComponent({ version: '0.0.1' })} {...props} />, { currentUser, diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx index 2add79f18e5..1953d456f1e 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx @@ -101,7 +101,7 @@ it('should render correctly when on a branch', async () => { extensions: [{ key: 'component-foo', name: 'ComponentFoo' }], }, }, - 'branch=normal-branch' + 'branch=normal-branch', ); expect(await screen.findByRole('link', { name: 'overview.page' })).toBeInTheDocument(); @@ -119,7 +119,7 @@ it('should render correctly when on a pull request', async () => { extensions: [{ key: 'component-foo', name: 'ComponentFoo' }], }, }, - 'pullRequest=01' + 'pullRequest=01', ); expect(await screen.findByRole('link', { name: 'overview.page' })).toBeInTheDocument(); @@ -127,7 +127,7 @@ it('should render correctly when on a pull request', async () => { expect(screen.getByRole('link', { name: 'layout.measures' })).toBeInTheDocument(); expect( - screen.queryByRole('link', { name: `layout.settings.${ComponentQualifier.Project}` }) + screen.queryByRole('link', { name: `layout.settings.${ComponentQualifier.Project}` }), ).not.toBeInTheDocument(); expect(screen.queryByRole('button', { name: 'project.info.title' })).not.toBeInTheDocument(); }); @@ -169,6 +169,6 @@ function renderMenu(props: Partial<ComponentPropsType<typeof Menu>> = {}, params {...props} />, params ? `/?${params}` : '/', - { featureList: [Feature.BranchSupport] } + { featureList: [Feature.BranchSupport] }, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts index c2c7896c919..7cf9c7986b9 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts @@ -28,8 +28,8 @@ describe('getCurrentPage', () => { expect( getCurrentPage( mockComponent({ key: 'foo', qualifier: ComponentQualifier.Portfolio }), - undefined - ) + undefined, + ), ).toEqual({ type: 'PORTFOLIO', component: 'foo', @@ -40,8 +40,8 @@ describe('getCurrentPage', () => { expect( getCurrentPage( mockComponent({ key: 'foo', qualifier: ComponentQualifier.SubPortfolio }), - undefined - ) + undefined, + ), ).toEqual({ type: 'PORTFOLIO', component: 'foo', @@ -52,8 +52,8 @@ describe('getCurrentPage', () => { expect( getCurrentPage( mockComponent({ key: 'foo', qualifier: ComponentQualifier.Application }), - mockBranch({ name: 'develop' }) - ) + mockBranch({ name: 'develop' }), + ), ).toEqual({ type: 'APPLICATION', component: 'foo', branch: 'develop' }); }); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx index 0c42dd26b86..6173b0a8dc6 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx @@ -73,7 +73,7 @@ export default function BranchHelpTooltip({ projectBinding != null ? translateWithParameters( `branch_like_navigation.no_branch_support.content_x.${isGitLab ? 'mr' : 'pr'}`, - translate('alm', projectBinding.alm) + translate('alm', projectBinding.alm), ) : translate('branch_like_navigation.no_branch_support.content') } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx index ec11d362bbe..6073ba63a1b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx @@ -40,7 +40,7 @@ export function CurrentBranchLikeMergeInformation(props: CurrentBranchLikeMergeI title={translateWithParameters( 'branch_like_navigation.for_merge_into_x_from_y.title', currentBranchLike.target, - currentBranchLike.branch + currentBranchLike.branch, )} > <FormattedMessage diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx index 6b8f94cf2aa..2dd8976b818 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx @@ -92,7 +92,7 @@ export class Menu extends React.PureComponent<Props, State> { highlightSiblingBranchlike = (indexDelta: number) => { const selectBranchLikeIndex = this.state.branchLikesToDisplay.findIndex((b) => - isSameBranchLike(b, this.state.selectedBranchLike) + isSameBranchLike(b, this.state.selectedBranchLike), ); const newIndex = selectBranchLikeIndex + indexDelta; @@ -133,7 +133,7 @@ export class Menu extends React.PureComponent<Props, State> { isPullRequest(pr) && (pr.title.toLowerCase().includes(q) || pr.key.toLowerCase().includes(q)); const filteredBranchLikes = this.props.branchLikes.filter( - (bl) => filterBranch(bl) || filterPullRequest(bl) + (bl) => filterBranch(bl) || filterPullRequest(bl), ); this.setState({ diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx index a579af63b49..6c81cdc7325 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx @@ -142,7 +142,7 @@ class GlobalNavMenu extends React.PureComponent<Props> { render() { const governanceInstalled = this.props.appState.qualifiers.includes( - ComponentQualifier.Portfolio + ComponentQualifier.Portfolio, ); return ( diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index f2bc2de133f..66ee594c4d4 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -95,7 +95,7 @@ export class SettingsNav extends React.PureComponent<Props> { renderConfigurationTab() { const extensionsWithoutSupport = this.props.extensions.filter( - (extension) => extension.key !== 'license/support' + (extension) => extension.key !== 'license/support', ); return ( <Dropdown @@ -234,7 +234,7 @@ export class SettingsNav extends React.PureComponent<Props> { const { extensions, pendingPlugins } = this.props; const hasSupportExtension = extensions.find((extension) => extension.key === 'license/support'); const hasGovernanceExtension = extensions.find( - (e) => e.key === AdminPageExtension.GovernanceConsole + (e) => e.key === AdminPageExtension.GovernanceConsole, ); const totalPendingPlugins = pendingPlugins.installing.length + diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx index 6c93e06ee73..684f2153e93 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx @@ -86,6 +86,6 @@ function getWrapper(props = {}) { refreshPending={() => {}} systemStatus="UP" {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx index b5d4600eb3f..fe1cf677498 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx @@ -56,7 +56,7 @@ it('should render correctly when governance is active', () => { expect( shallowRender({ extensions: [{ key: AdminPageExtension.GovernanceConsole, name: 'governance' }], - }) + }), ).toMatchSnapshot(); }); @@ -70,6 +70,6 @@ function shallowRender(props: Partial<SettingsNav['props']> = {}) { pendingPlugins={{ installing: [], removing: [], updating: [] }} systemStatus="UP" {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx b/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx index 4f30edf3a9c..85c551b6783 100644 --- a/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx @@ -39,7 +39,7 @@ it('should render correctly', () => { expect( shallowRender({ currentUser: mockLoggedInUser({ dismissedNotices: { [NoticeType.SONARLINT_AD]: true } }), - }) + }), ).toMatchSnapshot('adAlreadySeen'); expect(shallowRender({ currentUser: mockLoggedInUser() })).toMatchSnapshot('loggedIn'); }); @@ -75,6 +75,6 @@ function shallowRender(props: Partial<CurrentUserContextInterface> = {}) { updateDismissedNotices={jest.fn()} updateCurrentUserHomepage={jest.fn()} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx b/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx index ea29a9146a3..8d54909c6e0 100644 --- a/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx +++ b/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx @@ -96,7 +96,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> { isPreviousLTSUpdate( parsedVersion: number[], latestLTS: string, - systemUpgrades: GroupedSystemUpdate + systemUpgrades: GroupedSystemUpdate, ) { const [ltsMajor, ltsMinor] = latestLTS.split('.').map(Number); let ltsOlderThan6Month = false; @@ -172,7 +172,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> { groupBy(upgrades, (upgrade) => { const [, minor] = upgrade.version.split('.'); return minor; - }) + }), ); let useCase = UpdateUseCase.NewMinorVersion; @@ -190,7 +190,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> { const latest = [...upgrades].sort( (upgrade1, upgrade2) => new Date(upgrade2.releaseDate || '').getTime() - - new Date(upgrade1.releaseDate || '').getTime() + new Date(upgrade1.releaseDate || '').getTime(), )[0]; const dismissKey = useCase + latest.version; diff --git a/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx b/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx index 8aefb895618..a3b01520871 100644 --- a/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx @@ -190,6 +190,6 @@ function shallowRender(props: Partial<UpdateNotification['props']> = {}) { appState={mockAppState()} currentUser={mockCurrentUser()} {...props} - /> + />, ); } diff --git a/server/sonar-web/src/main/js/app/styles/components/ui.css b/server/sonar-web/src/main/js/app/styles/components/ui.css index 7c9f45d74e7..19ec40e317d 100644 --- a/server/sonar-web/src/main/js/app/styles/components/ui.css +++ b/server/sonar-web/src/main/js/app/styles/components/ui.css @@ -27,7 +27,9 @@ border: 1px solid #ccc; border-radius: 3px; background-image: linear-gradient(to bottom, #f5f5f5, #eee); - box-shadow: inset 0 1px 0 #fff, 0 1px 0 #ccc; + box-shadow: + inset 0 1px 0 #fff, + 0 1px 0 #ccc; color: var(--secondFontColor); font-size: 11px; text-align: center; diff --git a/server/sonar-web/src/main/js/app/styles/init/links.css b/server/sonar-web/src/main/js/app/styles/init/links.css index e28ed3057f6..f97437c5e8c 100644 --- a/server/sonar-web/src/main/js/app/styles/init/links.css +++ b/server/sonar-web/src/main/js/app/styles/init/links.css @@ -23,7 +23,9 @@ a { cursor: pointer; outline: none; text-decoration: none; - transition: border-bottom-color 0.2s ease, color 0.2s ease; + transition: + border-bottom-color 0.2s ease, + color 0.2s ease; } a:hover, diff --git a/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx b/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx index 1c010d010bf..4ebbca79f88 100644 --- a/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx +++ b/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx @@ -45,6 +45,6 @@ function renderNavigateWithParams(transformParams: (params: Params) => Dict<stri /> <Route path="*" element={<CatchAll />} /> </Routes> - </MemoryRouter> + </MemoryRouter>, ); } diff --git a/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts b/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts index 904873fe474..b7122e1dac2 100644 --- a/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts +++ b/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts @@ -47,6 +47,6 @@ afterAll(() => { it('should not render for anonymous user', () => { handleRequiredAuthorization(); expect(replace).toHaveBeenCalledWith( - '/sessions/new?return_to=%2Fpath%3Fid%3D12%23tag&authorizationError=true' + '/sessions/new?return_to=%2Fpath%3Fid%3D12%23tag&authorizationError=true', ); }); diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx index 8b02cbeab11..1b800f04a37 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -180,7 +180,7 @@ export default function startReactApp( l10nBundle: IntlShape, currentUser?: CurrentUser, appState?: AppState, - availableFeatures?: Feature[] + availableFeatures?: Feature[], ) { exportModulesAsGlobals(); @@ -271,6 +271,6 @@ export default function startReactApp( </AvailableFeaturesContext.Provider> </AppStateContextProvider> </HelmetProvider>, - el + el, ); } |