]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix eslint issues
authorPhilippe Perrin <philippe.perrin@sonarsource.com>
Thu, 7 Apr 2022 18:10:48 +0000 (20:10 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 8 Apr 2022 20:02:59 +0000 (20:02 +0000)
74 files changed:
server/sonar-web/src/main/js/app/components/AdminContainer.tsx
server/sonar-web/src/main/js/app/components/NonAdminPagesContainer.tsx
server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/AdminContainer-test.tsx.snap
server/sonar-web/src/main/js/app/components/extensions/PortfolioPage.tsx
server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx
server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/__snapshots__/PortfolioPage-test.tsx.snap
server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTagsSelector.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaTagsSelector-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaTags-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx
server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNav-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx
server/sonar-web/src/main/js/app/components/search/Search.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingTime.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureOverview-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/BubbleChart-test.tsx
server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx
server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx
server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx
server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx
server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesApp-test.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx
server/sonar-web/src/main/js/apps/overview/components/App.tsx
server/sonar-web/src/main/js/apps/overview/components/IssueRating.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/AllHoldersList-test.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx
server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BaselineSettingReferenceBranch-test.tsx
server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModal.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGatePermissionsAddModalRenderer-test.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModal-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsAddModalRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/ProfilesListRow-test.tsx.snap
server/sonar-web/src/main/js/apps/sessions/components/Login.tsx
server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx
server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/Login-test.tsx.snap
server/sonar-web/src/main/js/apps/webhooks/components/App.tsx
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerCode-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewerBase-test.tsx.snap
server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
server/sonar-web/src/main/js/components/common/MultiSelect.tsx
server/sonar-web/src/main/js/components/facet/ListStyleFacetFooter.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStep.tsx

index 0f05906ec49f32ef987aa43e296bfa3d36dd9e39..f5ef383db997a3be35a815e4246a5d5d573d12ed 100644 (file)
@@ -33,7 +33,6 @@ import SettingsNav from './nav/settings/SettingsNav';
 
 export interface AdminContainerProps {
   appState: AppState;
-  location: {};
   children: React.ReactElement;
 }
 
@@ -128,7 +127,6 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
           extensions={adminPages}
           fetchPendingPlugins={this.fetchPendingPlugins}
           fetchSystemStatus={this.fetchSystemStatus}
-          location={this.props.location}
           pendingPlugins={pendingPlugins}
           systemStatus={systemStatus}
         />
index e0ec00bb08f386c354aab2acae3fc6726cc96dd1..622a88610aef2e02eb35340fd04dcbc80c5fb8ed 100644 (file)
 import * as React from 'react';
 import { Alert } from '../../components/ui/Alert';
 import { translate } from '../../helpers/l10n';
-import { BranchLike } from '../../types/branch-like';
 import { isApplication } from '../../types/component';
 import { Component } from '../../types/types';
 
 export interface NonAdminPagesContainerProps {
   children: JSX.Element;
-  branchLike?: BranchLike;
-  branchLikes: BranchLike[];
   component: Component;
-  isInProgress?: boolean;
-  isPending?: boolean;
-  onBranchesChange: () => void;
-  onComponentChange: (changes: {}) => void;
 }
 
 export default function NonAdminPagesContainer(props: NonAdminPagesContainerProps) {
index 319896752c2091533b1767e211a24255ac89db06..fc5b9bcd6ab38217cbc371a07bae503a3f12ee5b 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { mockAppState, mockLocation } from '../../../helpers/testMocks';
+import { mockAppState } from '../../../helpers/testMocks';
 import { AdminContainer, AdminContainerProps } from '../AdminContainer';
 
 jest.mock('../../../api/plugins', () => ({
@@ -42,7 +42,6 @@ function shallowRender(props: Partial<AdminContainerProps> = {}) {
       appState={mockAppState({
         canAdmin: true
       })}
-      location={mockLocation()}
       {...props}>
       <div />
     </AdminContainer>
index 7674ff38787c8d62059d54a5e104f55c612c6071..d6d98b7ab095ac83d337af2d3375bcbf13a857bd 100644 (file)
@@ -57,12 +57,7 @@ it('should render correctly', () => {
 
 function shallowRender(props: Partial<NonAdminPagesContainerProps> = {}) {
   return shallow<NonAdminPagesContainerProps>(
-    <NonAdminPagesContainer
-      branchLikes={[]}
-      component={mockComponent()}
-      onBranchesChange={jest.fn()}
-      onComponentChange={jest.fn()}
-      {...props}>
+    <NonAdminPagesContainer component={mockComponent()} {...props}>
       <Child />
     </NonAdminPagesContainer>
   );
index a12b91340b1c02504b472a04636cf9e91ce92f20..b36639ca82e7146df5d6917069041def07b723a7 100644 (file)
@@ -13,17 +13,6 @@ exports[`should render correctly 1`] = `
     extensions={Array []}
     fetchPendingPlugins={[Function]}
     fetchSystemStatus={[Function]}
-    location={
-      Object {
-        "action": "PUSH",
-        "hash": "",
-        "key": "key",
-        "pathname": "/path",
-        "query": Object {},
-        "search": "",
-        "state": Object {},
-      }
-    }
     pendingPlugins={
       Object {
         "installing": Array [],
index 8ce97829e186ccfb5cc5c7692a4e575c000365ae..389c138c607d68d159a73e5b57241fdf6101ab7b 100644 (file)
@@ -28,12 +28,11 @@ export interface PortfolioPageProps extends WithRouterProps {
   component: Component;
 }
 
-export function PortfolioPage({ component, location }: PortfolioPageProps) {
+export function PortfolioPage({ component }: PortfolioPageProps) {
   return (
     <ProjectPageExtension
       component={component}
       params={{ pluginKey: 'governance', extensionKey: 'portfolio' }}
-      location={location}
     />
   );
 }
index 9ee040a60ff793ea577c222105df55b68403d84b..72befde92a816baa38bdcd29ea9415154c7151a7 100644 (file)
@@ -17,7 +17,6 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
-import { Location } from 'history';
 import * as React from 'react';
 import { connect } from 'react-redux';
 import { addGlobalErrorMessage } from '../../../store/globalMessages';
@@ -27,7 +26,6 @@ import Extension from './Extension';
 
 export interface ProjectAdminPageExtensionProps {
   component: Component;
-  location: Location;
   params: { extensionKey: string; pluginKey: string };
 }
 
index 56357e55b4adbaa669b7dda1549c2bd23d0306cc..40f8bd94b399e983eacf4c6a1283af249c8eb1b8 100644 (file)
@@ -26,7 +26,6 @@ import Extension from './Extension';
 export interface ProjectPageExtensionProps {
   branchLike?: BranchLike;
   component: Component;
-  location: { query: { id: string } };
   params: {
     extensionKey: string;
     pluginKey: string;
index 0dcf91d9032f0e496a41162c2b4415fdc208d144..f3b7a57bfc4c7d46048f3d08e329c45850c85acf 100644 (file)
@@ -20,7 +20,6 @@
 import { shallow } from 'enzyme';
 import * as React from 'react';
 import { mockComponent } from '../../../../helpers/mocks/component';
-import { mockLocation } from '../../../../helpers/testMocks';
 import {
   ProjectAdminPageExtension,
   ProjectAdminPageExtensionProps
@@ -41,7 +40,6 @@ function shallowRender(props: Partial<ProjectAdminPageExtensionProps> = {}) {
   return shallow(
     <ProjectAdminPageExtension
       component={mockComponent()}
-      location={mockLocation()}
       params={{ extensionKey: 'bar', pluginKey: 'foo' }}
       {...props}
     />
index fe89332d3dc0397febe4b902f8212a774cec1dd4..1d0dab75deccfb5d6ef182e762da68e8663dd6d8 100644 (file)
@@ -21,7 +21,6 @@ import { shallow } from 'enzyme';
 import * as React from 'react';
 import { mockMainBranch } from '../../../../helpers/mocks/branch-like';
 import { mockComponent } from '../../../../helpers/mocks/component';
-import { mockLocation } from '../../../../helpers/testMocks';
 import ProjectPageExtension, { ProjectPageExtensionProps } from '../ProjectPageExtension';
 
 it('should render correctly', () => {
@@ -43,7 +42,6 @@ function shallowRender(props?: Partial<ProjectPageExtensionProps>) {
       component={mockComponent({
         extensions: [{ key: 'plugin-key/extension-key', name: 'plugin' }]
       })}
-      location={mockLocation()}
       params={{ extensionKey: 'extension-key', pluginKey: 'plugin-key' }}
       {...props}
     />
index 553afe6de354c3b634f9419623c998755e2ba121..dc84ed679d00cd15d80641eddf6b4c9ddcaf3a5c 100644 (file)
@@ -24,17 +24,6 @@ exports[`should render correctly 1`] = `
       "tags": Array [],
     }
   }
-  location={
-    Object {
-      "action": "PUSH",
-      "hash": "",
-      "key": "key",
-      "pathname": "/path",
-      "query": Object {},
-      "search": "",
-      "state": Object {},
-    }
-  }
   params={
     Object {
       "extensionKey": "portfolio",
index 502c7deddf49d8ddae88dc8334e31f6e49fe76fe..8c192a2490d2b2afc4afb8aacad6954d2eadf686 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { Link } from 'react-router';
index 49b8ff4dc3bbceb741a5e639ea5c4aff326659b1..4e2f7efc4b6b105946baab3832e1421228892a1f 100644 (file)
@@ -72,7 +72,6 @@ export default class MetaTags extends React.PureComponent<Props> {
   };
 
   render() {
-    const { key } = this.props.component;
     const tags = this.props.component.tags || [];
 
     if (this.canUpdateTags()) {
@@ -82,11 +81,7 @@ export default class MetaTags extends React.PureComponent<Props> {
             closeOnClick={false}
             closeOnClickOutside={true}
             overlay={
-              <MetaTagsSelector
-                project={key}
-                selectedTags={tags}
-                setProjectTags={this.handleSetProjectTags}
-              />
+              <MetaTagsSelector selectedTags={tags} setProjectTags={this.handleSetProjectTags} />
             }
             overlayPlacement={PopupPlacement.BottomLeft}>
             <ButtonLink innerRef={tagsList => (this.tagsList = tagsList)} stopPropagation={true}>
index d27463e1222e02109f68b64b2163a87e2393a7d1..d6713dcb72a0595101c01bb099728dd2c5887cc4 100644 (file)
@@ -23,7 +23,6 @@ import { searchProjectTags } from '../../../../../../api/components';
 import TagsSelector from '../../../../../../components/tags/TagsSelector';
 
 interface Props {
-  project: string;
   selectedTags: string[];
   setProjectTags: (tags: string[]) => void;
 }
index 22bb661a9bdc9cb5da4e79f8f5b5ba21edc7c9ec..f96f150bf6869d0a3c066345241a7e54af7cff92 100644 (file)
@@ -37,14 +37,14 @@ it('searches tags on mount', () => {
   (searchProjectTags as jest.Mock).mockImplementation(() =>
     Promise.resolve({ tags: ['foo', 'bar'] })
   );
-  mount(<MetaTagsSelector project="foo" selectedTags={[]} setProjectTags={jest.fn()} />);
+  mount(<MetaTagsSelector selectedTags={[]} setProjectTags={jest.fn()} />);
   expect(searchProjectTags).toBeCalledWith({ ps: 9, q: '' });
 });
 
 it('selects and deselects tags', () => {
   const setProjectTags = jest.fn();
   const wrapper = shallow(
-    <MetaTagsSelector project="foo" selectedTags={['foo', 'bar']} setProjectTags={setProjectTags} />
+    <MetaTagsSelector selectedTags={['foo', 'bar']} setProjectTags={setProjectTags} />
   );
 
   const tagSelect: any = wrapper.find('TagsSelector');
index 5e9a5365588903dfc13bae85918ddfecbccb809d..72b8274396deab51a6553334c894aaacb1abe03a 100644 (file)
@@ -9,7 +9,6 @@ exports[`should render with tags and admin rights 1`] = `
     closeOnClickOutside={true}
     overlay={
       <MetaTagsSelector
-        project="my-second-project"
         selectedTags={
           Array [
             "foo",
index 45288c9ef078a6ae2f3962a37aebe79dffb44d68..0c7b6d964ccdf6442429cf04c5681f6998c8943c 100644 (file)
@@ -44,7 +44,7 @@ export function GlobalNav(props: GlobalNavProps) {
 
       <ul className="global-navbar-menu global-navbar-menu-right">
         <EmbedDocsPopupHelper />
-        <Search currentUser={currentUser} />
+        <Search />
         <GlobalNavUser currentUser={currentUser} />
       </ul>
     </NavBar>
index 964e19a9cdbd092c3cd88e424f17ac96d5c5092d..c693f643ee95b0f810873f97a7b51ee7cc61886e 100644 (file)
@@ -23,13 +23,7 @@ exports[`should render correctly: anonymous users 1`] = `
     className="global-navbar-menu global-navbar-menu-right"
   >
     <EmbedDocsPopupHelper />
-    <withRouter(Search)
-      currentUser={
-        Object {
-          "isLoggedIn": false,
-        }
-      }
-    />
+    <withRouter(Search) />
     <withRouter(GlobalNavUser)
       currentUser={
         Object {
@@ -64,13 +58,7 @@ exports[`should render correctly: logged in users 1`] = `
     className="global-navbar-menu global-navbar-menu-right"
   >
     <EmbedDocsPopupHelper />
-    <withRouter(Search)
-      currentUser={
-        Object {
-          "isLoggedIn": true,
-        }
-      }
-    />
+    <withRouter(Search) />
     <withRouter(GlobalNavUser)
       currentUser={
         Object {
index 1075a088893ca6874ddeccf8bbdd7d6edd3a4d91..0dd3a155f42afd424cebb697fe0d790cd64029e5 100644 (file)
@@ -37,7 +37,6 @@ interface Props {
   extensions: Extension[];
   fetchPendingPlugins: () => void;
   fetchSystemStatus: () => void;
-  location: {};
   pendingPlugins: PendingPluginResult;
   systemStatus: SysStatus;
 }
index 4b4c53afac37cc3198d2cee70d83c4d6b7e8e947..7b96b2cc92a9b53f993da141b41d04791dc39510 100644 (file)
@@ -65,7 +65,6 @@ function shallowRender(props: Partial<SettingsNav['props']> = {}) {
       extensions={[{ key: 'foo', name: 'Foo' }]}
       fetchPendingPlugins={jest.fn()}
       fetchSystemStatus={jest.fn()}
-      location={{}}
       pendingPlugins={{ installing: [], removing: [], updating: [] }}
       systemStatus="UP"
       {...props}
index 9e8664ef0fc1d2b6e3326b8f6858af460109decb..9d3c30f43ffee11ee77bf9bfe5ddecba85750f32 100644 (file)
@@ -35,7 +35,6 @@ import { scrollToElement } from '../../../helpers/scrolling';
 import { getComponentOverviewUrl } from '../../../helpers/urls';
 import { ComponentQualifier } from '../../../types/component';
 import { Dict } from '../../../types/types';
-import { CurrentUser } from '../../../types/users';
 import RecentHistory from '../RecentHistory';
 import './Search.css';
 import { ComponentResult, More, Results, sortQualifiers } from './utils';
@@ -43,12 +42,6 @@ import { ComponentResult, More, Results, sortQualifiers } from './utils';
 const SearchResults = lazyLoadComponent(() => import('./SearchResults'));
 const SearchResult = lazyLoadComponent(() => import('./SearchResult'));
 
-interface OwnProps {
-  currentUser: CurrentUser;
-}
-
-type Props = OwnProps & WithRouterProps;
-
 interface State {
   loading: boolean;
   loadingMore?: string;
@@ -61,13 +54,13 @@ interface State {
   shortQuery: boolean;
 }
 
-export class Search extends React.PureComponent<Props, State> {
+export class Search extends React.PureComponent<WithRouterProps, State> {
   input?: HTMLInputElement | null;
   node?: HTMLElement | null;
   nodes: Dict<HTMLElement>;
   mounted = false;
 
-  constructor(props: Props) {
+  constructor(props: WithRouterProps) {
     super(props);
     this.nodes = {};
     this.search = debounce(this.search, 250);
@@ -95,7 +88,7 @@ export class Search extends React.PureComponent<Props, State> {
     this.nodes = {};
   }
 
-  componentDidUpdate(_prevProps: Props, prevState: State) {
+  componentDidUpdate(_prevProps: WithRouterProps, prevState: State) {
     if (prevState.selected !== this.state.selected) {
       this.scrollToSelected();
     }
@@ -402,4 +395,4 @@ export class Search extends React.PureComponent<Props, State> {
   }
 }
 
-export default withRouter<OwnProps>(Search);
+export default withRouter<{}>(Search);
index 5db61515125d9b9e36626f86881f6ae1fc2e1d1e..01243ca661e777887f72006f575de0b3029696a5 100644 (file)
@@ -21,14 +21,12 @@ import * as React from 'react';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { translate } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
-import { Component } from '../../../types/types';
 
 // Do not display the pending time for values smaller than this threshold (in ms)
 const MIN_PENDING_TIME_THRESHOLD = 1000;
 
 export interface Props {
   className?: string;
-  component?: Pick<Component, 'key'>;
   pendingCount?: number;
   pendingTime?: number;
 }
index d405bbd13eb1f32cb1da354f69e8c6ee3a0385b9..baab266c94eb532622ceae5e76b0597592676591 100644 (file)
@@ -36,6 +36,7 @@ interface Props {
   modalHeader: string;
   onClose: () => void;
   onDone: (severity: string) => Promise<void>;
+  // eslint-disable-next-line react/no-unused-prop-types
   profiles: Profile[];
   rule: Rule | RuleDetails;
 }
index a9a5d6604c9ffd321acb42e17c9d7332ad13dbb9..3cb94eac4e81e2fa02c50ae1ca8d9dce180c8acb 100644 (file)
@@ -641,7 +641,6 @@ export class App extends React.PureComponent<Props, State> {
                   {rules.map(rule => (
                     <RuleListItem
                       activation={this.getRuleActivation(rule.key)}
-                      canWrite={this.state.canWrite}
                       isLoggedIn={isLoggedIn(this.props.currentUser)}
                       key={rule.key}
                       onActivate={this.handleRuleActivate}
index 96f59bce97d36046a162edf39b5e20e10ae37dcc..02aa57b0a597a88ca7a6125b90578b4779d35d78 100644 (file)
@@ -238,7 +238,6 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
           {!ruleDetails.isTemplate && (
             <RuleDetailsProfiles
               activations={this.state.actives}
-              canWrite={canWrite}
               onActivate={this.handleActivate}
               onDeactivate={this.handleDeactivate}
               referencedProfiles={referencedProfiles}
index 94b9422d37ce6aa1f78b9bd4ca4c12e1367b39bb..a154245226d101f1e994e60532df2303bacbcd30 100644 (file)
@@ -35,7 +35,6 @@ import RuleInheritanceIcon from './RuleInheritanceIcon';
 
 interface Props {
   activations: RuleActivation[] | undefined;
-  canWrite: boolean | undefined;
   onActivate: () => Promise<void>;
   onDeactivate: () => Promise<void>;
   referencedProfiles: Dict<Profile>;
index a8c419998da708901f54ee24cb324aa954e9f65c..cef3becbb43278d63beea1871dc4809eb5c1e77e 100644 (file)
@@ -37,7 +37,6 @@ import SimilarRulesFilter from './SimilarRulesFilter';
 
 interface Props {
   activation?: Activation;
-  canWrite?: boolean;
   isLoggedIn: boolean;
   onActivate: (profile: string, rule: string, activation: Activation) => void;
   onDeactivate: (profile: string, rule: string) => void;
index cb55971f54be2b346dd4dc8c3cd19f5f7987c16c..4ebb7c6295d1480d27cd93e55cc45a8e119701b9 100644 (file)
@@ -271,7 +271,6 @@ exports[`should render correctly: loaded 1`] = `
         className="layout-page-main-inner"
       >
         <RuleListItem
-          canWrite={true}
           isLoggedIn={true}
           key="javascript:S1067"
           onActivate={[Function]}
@@ -299,7 +298,6 @@ exports[`should render correctly: loaded 1`] = `
           selected={true}
         />
         <RuleListItem
-          canWrite={true}
           isLoggedIn={true}
           key="javascript:S1067"
           onActivate={[Function]}
index fad332407d80d3cd4bedd0b877dafdf2782692e3..de90a337509e94794cfa5f87aab5f9b15f1a0f31 100644 (file)
@@ -333,7 +333,6 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
 
     return (
       <TreeMapView
-        branchLike={this.props.branchLike}
         components={this.state.components}
         handleSelect={this.onOpenComponent}
         metric={metric}
index b4854392fa4ac9f075ee7f883b08cae44f60643d..466423cc0ad23dacdd912bc03bbb8fc21b4f5ecd 100644 (file)
@@ -139,7 +139,6 @@ export default class MeasureOverview extends React.PureComponent<Props, State> {
 
     return (
       <BubbleChart
-        component={component}
         components={this.state.components}
         domain={domain}
         metrics={metrics}
index 13bfbaa05b30681c2433a170c7087c170f19579b..a3e7343a9508e3381cc27fde5f8c27a9b9ff1a76 100644 (file)
@@ -70,20 +70,6 @@ exports[`should render correctly: default 1`] = `
       loading={false}
     />
     <BubbleChart
-      component={
-        Object {
-          "key": "foo",
-          "measures": Array [
-            Object {
-              "bestValue": false,
-              "metric": "bugs",
-              "value": "12",
-            },
-          ],
-          "name": "Foo",
-          "qualifier": "TRK",
-        }
-      }
       components={Array []}
       domain="Reliability"
       metrics={
@@ -223,20 +209,6 @@ exports[`should render correctly: has leak period 1`] = `
       loading={false}
     />
     <BubbleChart
-      component={
-        Object {
-          "key": "foo",
-          "measures": Array [
-            Object {
-              "bestValue": false,
-              "metric": "bugs",
-              "value": "12",
-            },
-          ],
-          "name": "Foo",
-          "qualifier": "TRK",
-        }
-      }
       components={Array []}
       domain="Reliability"
       metrics={
index 5f7624d7ec9ad0c8860fad9b7746d3279655bc33..39be3005c63b9ae27b88c4b24ce79598ed4b583e 100644 (file)
@@ -32,7 +32,6 @@ import { formatMeasure, isDiffMetric } from '../../../helpers/measures';
 import { isDefined } from '../../../helpers/types';
 import { isProject } from '../../../types/component';
 import {
-  ComponentMeasure,
   ComponentMeasureEnhanced,
   ComponentMeasureIntern,
   Dict,
@@ -50,7 +49,6 @@ import EmptyResult from './EmptyResult';
 const HEIGHT = 500;
 
 interface Props {
-  component: ComponentMeasure;
   components: ComponentMeasureEnhanced[];
   domain: string;
   metrics: Dict<Metric>;
index 325d9370cff7983e04bc5b84cdb48b0782ed0281..d564ef2fdaf0ea2e51e1a667e26da184d15f2af1 100644 (file)
@@ -29,13 +29,11 @@ import { getComponentMeasureUniqueKey } from '../../../helpers/component';
 import { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n';
 import { formatMeasure, isDiffMetric } from '../../../helpers/measures';
 import { isDefined } from '../../../helpers/types';
-import { BranchLike } from '../../../types/branch-like';
 import { MetricKey } from '../../../types/metrics';
 import { ComponentMeasureEnhanced, ComponentMeasureIntern, Metric } from '../../../types/types';
 import EmptyResult from './EmptyResult';
 
 interface Props {
-  branchLike?: BranchLike;
   components: ComponentMeasureEnhanced[];
   handleSelect: (component: ComponentMeasureIntern) => void;
   metric: Metric;
index 0b69818e93716ce32d99edae19f0d486d70e17f5..a52f882cf91d4ce5bb6b79961a85c0bc784b9f32 100644 (file)
@@ -75,7 +75,6 @@ it('should handle filtering', () => {
 function shallowRender(overrides: Partial<BubbleChart['props']> = {}) {
   return shallow<BubbleChart>(
     <BubbleChart
-      component={mockComponentMeasure()}
       components={[
         enhanceComponent(
           mockComponentMeasure(true, {
index 4471a7923b043488225d8d098c833ea5b7a9db66..f3f9631952c4f29033d044f163c496f684c07a6b 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import classNames from 'classnames';
 import * as React from 'react';
 import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
index 1f9706f2148d49b89dcf6f8e6223b83f92acb142..c7e1c62d258353c0ee3f0fd8e0bf3e77bce450fd 100644 (file)
@@ -23,12 +23,10 @@ import { WithRouterProps } from 'react-router';
 import { getAlmSettings } from '../../../api/alm-settings';
 import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';
 import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
-import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn';
 import { translate } from '../../../helpers/l10n';
 import { getProjectUrl } from '../../../helpers/urls';
 import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';
 import { AppState } from '../../../types/appstate';
-import { LoggedInUser } from '../../../types/users';
 import AlmBindingDefinitionForm from '../../settings/components/almIntegration/AlmBindingDefinitionForm';
 import AzureProjectCreate from './AzureProjectCreate';
 import BitbucketCloudProjectCreate from './BitbucketCloudProjectCreate';
@@ -42,7 +40,6 @@ import { CreateProjectModes } from './types';
 
 interface Props extends Pick<WithRouterProps, 'router' | 'location'> {
   appState: AppState;
-  currentUser: LoggedInUser;
 }
 
 interface State {
@@ -273,4 +270,4 @@ export class CreateProjectPage extends React.PureComponent<Props, State> {
   }
 }
 
-export default whenLoggedIn(withAppStateContext(CreateProjectPage));
+export default withAppStateContext(CreateProjectPage);
index ffde9cf777e12a4cdf55dd4fb25efe80828e51bc..e801b649039623d2f8ffe2019c2a507c850e6665 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { Link } from 'react-router';
index 5a00628a86b098cffdd0da3e570d6e234f092e9a..31dd8c7ca2f5ddc7cee8bc198211179ee02bc9dd 100644 (file)
 import { shallow } from 'enzyme';
 import * as React from 'react';
 import { getAlmSettings } from '../../../../api/alm-settings';
-import {
-  mockAppState,
-  mockLocation,
-  mockLoggedInUser,
-  mockRouter
-} from '../../../../helpers/testMocks';
+import { mockAppState, mockLocation, mockRouter } from '../../../../helpers/testMocks';
 import { waitAndUpdate } from '../../../../helpers/testUtils';
 import { AlmKeys } from '../../../../types/alm-settings';
 import AlmBindingDefinitionForm from '../../../settings/components/almIntegration/AlmBindingDefinitionForm';
@@ -133,7 +128,6 @@ function shallowRender(props: Partial<CreateProjectPage['props']> = {}) {
   return shallow<CreateProjectPage>(
     <CreateProjectPage
       appState={mockAppState()}
-      currentUser={mockLoggedInUser()}
       location={mockLocation()}
       router={mockRouter()}
       {...props}
index 7da860bcc43893aba0c18b6ae4599eea9557adf1..b00454f3fcae838bef7ddd4a7cf1d69b3726e109 100644 (file)
@@ -100,7 +100,6 @@ interface Props {
   currentUser: CurrentUser;
   fetchBranchStatus: (branchLike: BranchLike, projectKey: string) => void;
   location: Location;
-  onBranchesChange?: () => void;
   router: Pick<Router, 'push' | 'replace'>;
 }
 
index ff7dfd752adf126f2d950639315f5df2332c4a4e..7b9c514592f573fe37df1f903bc0f573bd92ecd3 100644 (file)
@@ -622,7 +622,6 @@ function shallowRender(props: Partial<App['props']> = {}) {
       currentUser={mockLoggedInUser()}
       fetchBranchStatus={jest.fn()}
       location={mockLocation({ pathname: '/issues', query: {} })}
-      onBranchesChange={() => {}}
       router={mockRouter()}
       {...props}
     />
index d107b97a5dd71e7acff5097e14b5366ab29def84..ca13e67a7e3f9ccf39572a1455c9594bca88f2a9 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import { omit, sortBy, without } from 'lodash';
 import * as React from 'react';
 import FacetBox from '../../../components/facet/FacetBox';
index 0477fff99e9ce3d699693d1af0ba77dcbb8da2fd..192ecf0eaa54548d52415797ebc99c946698dd03 100644 (file)
@@ -20,7 +20,6 @@
 import * as React from 'react';
 import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
 import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
-import { Router, withRouter } from '../../../components/hoc/withRouter';
 import { lazyLoadComponent } from '../../../components/lazyLoadComponent';
 import { isPullRequest } from '../../../helpers/branch-like';
 import { ProjectAlmBindingResponse } from '../../../types/alm-settings';
@@ -41,7 +40,6 @@ interface Props {
   isInProgress?: boolean;
   isPending?: boolean;
   projectBinding?: ProjectAlmBindingResponse;
-  router: Pick<Router, 'replace'>;
 }
 
 export class App extends React.PureComponent<Props> {
@@ -94,4 +92,4 @@ export class App extends React.PureComponent<Props> {
   }
 }
 
-export default withRouter(withAppStateContext(App));
+export default withAppStateContext(App);
index 2eee2295c08b304e545d66b36790896a517933b5..b81a710a55989d10ef6286c71d5fbd91b3027565 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import * as React from 'react';
 import Tooltip from '../../../components/controls/Tooltip';
 import RatingTooltipContent from '../../../components/measure/RatingTooltipContent';
index 4452c9090cf007ce551334060def0b6995efd877..e9e3c018fce758c8d8798d17eaedd7e4182a4eb8 100644 (file)
@@ -50,12 +50,6 @@ it('should render BranchOverview', () => {
 
 function getWrapper(props = {}) {
   return shallow(
-    <App
-      appState={mockAppState()}
-      branchLikes={[]}
-      component={component}
-      router={{ replace: jest.fn() }}
-      {...props}
-    />
+    <App appState={mockAppState()} branchLikes={[]} component={component} {...props} />
   );
 }
index 8c4a4eb19f07a79ef501bb726faacf04873bbd66..630e78f5217758c527c3f15aea4c5c0a6e091017 100644 (file)
@@ -41,7 +41,6 @@ interface OwnProps {
   grantPermissionToUser: (login: string, permission: string) => Promise<void>;
   groups: PermissionGroup[];
   groupsPaging?: Paging;
-  loadHolders: () => void;
   loading?: boolean;
   onLoadMore: () => void;
   onFilter: (filter: string) => void;
index 4a0708dc1032b4d33af40b3867bb8191a5a26a9c..60d89d36cb0103cb6f5d201ca8038a587e2bc33a 100644 (file)
@@ -271,7 +271,6 @@ export default class App extends React.PureComponent<{}, State> {
           grantPermissionToUser={this.grantPermissionToUser}
           groups={this.state.groups}
           groupsPaging={this.state.groupsPaging}
-          loadHolders={this.loadHolders}
           loading={this.state.loading}
           onFilter={this.onFilter}
           onLoadMore={this.onLoadMore}
index 7ca580ec0dbbbfb2d3aecee7589bb62dac500c53..e68aac57038cabe155356450551e5bbf6fd9ff96 100644 (file)
@@ -84,7 +84,6 @@ function shallowRender(props: Partial<AllHoldersList['props']> = {}) {
       grantPermissionToGroup={jest.fn()}
       grantPermissionToUser={jest.fn()}
       groups={[mockPermissionGroup()]}
-      loadHolders={jest.fn()}
       onLoadMore={jest.fn()}
       onFilter={jest.fn()}
       onSearch={jest.fn()}
index bf85f340bc336d93b3731279aa3b27c7a449ed80..17de9f73448195e41abc6bc1a3461b2771a47a72 100644 (file)
@@ -21,7 +21,6 @@ exports[`should render correctly 1`] = `
     grantPermissionToGroup={[Function]}
     grantPermissionToUser={[Function]}
     groups={Array []}
-    loadHolders={[Function]}
     loading={true}
     onFilter={[Function]}
     onLoadMore={[Function]}
@@ -79,7 +78,6 @@ exports[`should render correctly 2`] = `
         "total": 2,
       }
     }
-    loadHolders={[Function]}
     loading={false}
     onFilter={[Function]}
     onLoadMore={[Function]}
index 12e94c24f5ecb7ac2175fec3d129f3466694f0e8..9cf2517a172cbbba036ecf3e6e13872a56276df5 100644 (file)
@@ -31,7 +31,6 @@ import { NewCodePeriodSettingType } from '../../../types/types';
 export interface BaselineSettingReferenceBranchProps {
   branchList: BranchOption[];
   className?: string;
-  configuredBranchName?: string;
   disabled?: boolean;
   onChangeReferenceBranch: (value: string) => void;
   onSelect: (selection: NewCodePeriodSettingType) => void;
index 7ac3867884adf99828a38fa04907d2153a013ad8..eba115e93b165fd2c1a18190512a8a4316679d32 100644 (file)
@@ -30,14 +30,11 @@ import BaselineSettingReferenceBranch, {
 
 it('should render correctly', () => {
   expect(shallowRender()).toMatchSnapshot('Project level');
-  expect(shallowRender({ settingLevel: 'branch', configuredBranchName: 'master' })).toMatchSnapshot(
-    'Branch level'
-  );
+  expect(shallowRender({ settingLevel: 'branch' })).toMatchSnapshot('Branch level');
   expect(
     shallowRender({
       branchList: [{ label: 'master', value: 'master', isMain: true }],
-      settingLevel: 'branch',
-      configuredBranchName: 'master'
+      settingLevel: 'branch'
     })
   ).toMatchSnapshot('Branch level - no other branches');
 });
index 47a0ff132490b79fdbf1115fa49c66ed3e702e61..106ab095f921297672cce5693a3d5d6b51be050f 100644 (file)
@@ -26,7 +26,6 @@ import Filter from './Filter';
 import FilterHeader from './FilterHeader';
 
 export interface Props {
-  className?: string;
   facet?: Facet;
   maxFacetValue?: number;
   onQueryChange: (change: RawQuery) => void;
index db56242ada7eacb150e3a35fff50e5057fd4554a..c0d5e024c733696987efe2d8f054a28032d516b1 100644 (file)
@@ -27,7 +27,6 @@ import Filter from './Filter';
 import FilterHeader from './FilterHeader';
 
 export interface Props {
-  className?: string;
   facet?: Facet;
   maxFacetValue?: number;
   onQueryChange: (change: RawQuery) => void;
index 81bb2ec4ad00f83b5cdbeb952923ef137f588297..2a2a7160b2c29dc68cd03c82c847c435e6fae846 100644 (file)
@@ -111,7 +111,7 @@ export default class QualityGatePermissionsAddModal extends React.Component<Prop
 
   render() {
     const { submitting } = this.props;
-    const { loading, query = '', searchResults, selection } = this.state;
+    const { loading, searchResults, selection } = this.state;
 
     return (
       <QualityGatePermissionsAddModalRenderer
@@ -120,7 +120,6 @@ export default class QualityGatePermissionsAddModal extends React.Component<Prop
         onInputChange={this.handleInputChange}
         onSelection={this.handleSelection}
         onSubmit={this.handleSubmit}
-        query={query}
         searchResults={searchResults}
         selection={selection}
         submitting={submitting}
index 47c6190c8012b5f2f5114501921bd0a6a88302eb..f848fae60659cec98959daaecd9e84636cab7dbd 100644 (file)
@@ -36,7 +36,6 @@ export interface QualityGatePermissionsAddModalRendererProps {
   onSelection: (selection: Option) => void;
   submitting: boolean;
   loading: boolean;
-  query: string;
   searchResults: Array<UserBase | Group>;
   selection?: UserBase | Group;
 }
index da50d58ab68238fe68fd5ef52616916503cd2f03..4d2a5f0433631747328b42c21a8fee1c8103f5ed 100644 (file)
@@ -27,13 +27,12 @@ import QualityGatePermissionsAddModalRenderer, {
 
 it('should render correctly', () => {
   expect(shallowRender()).toMatchSnapshot('default');
-  expect(shallowRender({ query: 'a' })).toMatchSnapshot('short query');
   expect(shallowRender({ selection: mockUserBase() })).toMatchSnapshot('selection');
   expect(shallowRender({ selection: mockUserBase(), submitting: true })).toMatchSnapshot(
     'submitting'
   );
   expect(
-    shallowRender({ query: 'ab', searchResults: [mockUserBase(), { name: 'group name' }] })
+    shallowRender({ searchResults: [mockUserBase(), { name: 'group name' }] })
   ).toMatchSnapshot('query and results');
 });
 
@@ -52,7 +51,6 @@ function shallowRender(overrides: Partial<QualityGatePermissionsAddModalRenderer
       onInputChange={jest.fn()}
       onSelection={jest.fn()}
       onSubmit={jest.fn()}
-      query=""
       searchResults={[]}
       submitting={false}
       {...overrides}
index 360a11c6027301b62fba280c4a6978154afc0246..60b40cc6cca7306b5ba2e5c2ab5a6275a7847181 100644 (file)
@@ -7,7 +7,6 @@ exports[`should render correctly 1`] = `
   onInputChange={[Function]}
   onSelection={[Function]}
   onSubmit={[Function]}
-  query=""
   searchResults={Array []}
   submitting={false}
 />
index f11d813ff894016db68180b97f2b3efc86466dc6..6feb60f1acc445990ef96345ecb8c81717306206 100644 (file)
@@ -203,70 +203,6 @@ exports[`should render correctly: selection 1`] = `
 </Modal>
 `;
 
-exports[`should render correctly: short query 1`] = `
-<Modal
-  contentLabel="quality_gates.permissions.grant"
-  onRequestClose={[MockFunction]}
->
-  <header
-    className="modal-head"
-  >
-    <h2>
-      quality_gates.permissions.grant
-    </h2>
-  </header>
-  <form
-    onSubmit={[MockFunction]}
-  >
-    <div
-      className="modal-body"
-    >
-      <div
-        className="modal-field"
-      >
-        <label>
-          quality_gates.permissions.search
-        </label>
-        <Select
-          autoFocus={true}
-          className="Select-big"
-          components={
-            Object {
-              "Control": [Function],
-              "Option": [Function],
-              "SingleValue": [Function],
-            }
-          }
-          filterOptions={[Function]}
-          isClearable={false}
-          isLoading={false}
-          isSearchable={true}
-          noOptionsMessage={[Function]}
-          onChange={[MockFunction]}
-          onInputChange={[MockFunction]}
-          options={Array []}
-          placeholder=""
-        />
-      </div>
-    </div>
-    <footer
-      className="modal-foot"
-    >
-      <SubmitButton
-        disabled={true}
-      >
-        add_verb
-      </SubmitButton>
-      <ResetButtonLink
-        onClick={[MockFunction]}
-      >
-        cancel
-      </ResetButtonLink>
-    </footer>
-  </form>
-</Modal>
-`;
-
 exports[`should render correctly: submitting 1`] = `
 <Modal
   contentLabel="quality_gates.permissions.grant"
index 48c59ac56c4833c921f20b620a6f424369d417c8..62fcbf30d0a4dbd44ad8b5a37227a1a260c44d7b 100644 (file)
@@ -43,7 +43,6 @@ import ProfileModalForm from './ProfileModalForm';
 
 interface Props {
   className?: string;
-  fromList?: boolean;
   profile: Profile;
   router: Pick<Router, 'push' | 'replace'>;
   updateProfiles: () => Promise<void>;
index cc37a7b082010bff0693a1f188593b6c137a867e..6bf8c8a38ec51d4b3fb55c72f71d9c57589585e6 100644 (file)
@@ -98,7 +98,7 @@ export function ProfilesListRow(props: ProfilesListRowProps) {
       </td>
 
       <td className="quality-profiles-table-actions thin nowrap text-middle text-right">
-        <ProfileActions fromList={true} profile={profile} updateProfiles={props.updateProfiles} />
+        <ProfileActions profile={profile} updateProfiles={props.updateProfiles} />
       </td>
     </tr>
   );
index 25e5e98478b44179297a16234bc06d23b21bc412..a19c915a89cedb2a2b48ab2b7b4cf692d63dfa3c 100644 (file)
@@ -97,7 +97,6 @@ exports[`should render correctly: built-in profile 1`] = `
     className="quality-profiles-table-actions thin nowrap text-middle text-right"
   >
     <withRouter(ProfileActions)
-      fromList={true}
       profile={
         Object {
           "activeDeprecatedRuleCount": 2,
@@ -189,7 +188,6 @@ exports[`should render correctly: default 1`] = `
     className="quality-profiles-table-actions thin nowrap text-middle text-right"
   >
     <withRouter(ProfileActions)
-      fromList={true}
       profile={
         Object {
           "activeDeprecatedRuleCount": 0,
@@ -312,7 +310,6 @@ exports[`should render correctly: default profile 1`] = `
     className="quality-profiles-table-actions thin nowrap text-middle text-right"
   >
     <withRouter(ProfileActions)
-      fromList={true}
       profile={
         Object {
           "activeDeprecatedRuleCount": 2,
@@ -429,7 +426,6 @@ exports[`should render correctly: with deprecated rules 1`] = `
     className="quality-profiles-table-actions thin nowrap text-middle text-right"
   >
     <withRouter(ProfileActions)
-      fromList={true}
       profile={
         Object {
           "activeDeprecatedRuleCount": 10,
index 88d364073d6d57804f8f01e91c2c5990bc1fec56..1934450b65d91e324eed38e51b45a4679ffc56e9 100644 (file)
@@ -54,11 +54,7 @@ export function Login(props: LoginProps) {
         <OAuthProviders identityProviders={identityProviders} returnTo={returnTo} />
       )}
 
-      <LoginForm
-        collapsed={identityProviders.length > 0}
-        onSubmit={props.onSubmit}
-        returnTo={returnTo}
-      />
+      <LoginForm collapsed={identityProviders.length > 0} onSubmit={props.onSubmit} />
 
       <GlobalMessagesContainer />
     </div>
index c332f227f167cf45fd72236337cb9a9aa8835550..aa137b6a5bb1e8faf7b7e44ee5e5aeeb94d4e2e6 100644 (file)
@@ -27,7 +27,6 @@ import './LoginForm.css';
 interface Props {
   collapsed?: boolean;
   onSubmit: (login: string, password: string) => Promise<void>;
-  returnTo: string;
 }
 
 interface State {
index f89fb6cb1895ebe0f827ba95513b6a1bb5dfdb3d..5f3b1b64385c00508a7810ee38557ac02cd96d77 100644 (file)
@@ -24,7 +24,7 @@ import LoginForm from '../LoginForm';
 
 it('logs in with simple credentials', () => {
   const onSubmit = jest.fn(() => Promise.resolve());
-  const wrapper = shallow(<LoginForm onSubmit={onSubmit} returnTo="" />);
+  const wrapper = shallow(<LoginForm onSubmit={onSubmit} />);
   expect(wrapper).toMatchSnapshot();
 
   change(wrapper.find('#login'), 'admin');
@@ -36,7 +36,7 @@ it('logs in with simple credentials', () => {
 
 it('should display a spinner and disabled button while loading', async () => {
   const onSubmit = jest.fn(() => Promise.resolve());
-  const wrapper = shallow(<LoginForm onSubmit={onSubmit} returnTo="" />);
+  const wrapper = shallow(<LoginForm onSubmit={onSubmit} />);
 
   change(wrapper.find('#login'), 'admin');
   change(wrapper.find('#password'), 'admin');
@@ -48,7 +48,7 @@ it('should display a spinner and disabled button while loading', async () => {
 });
 
 it('expands more options', () => {
-  const wrapper = shallow(<LoginForm collapsed={true} onSubmit={jest.fn()} returnTo="" />);
+  const wrapper = shallow(<LoginForm collapsed={true} onSubmit={jest.fn()} />);
   expect(wrapper).toMatchSnapshot();
 
   click(wrapper.find('.js-more-options'));
index d09b2373fa9f889fc5849e7d00b3deea3fe969c3..d9ee013c6b7a3f31fbd38d04449663acbb095214 100644 (file)
@@ -33,7 +33,6 @@ exports[`should render correctly: with authorization error 1`] = `
   <LoginForm
     collapsed={true}
     onSubmit={[MockFunction]}
-    returnTo=""
   />
   <Connect(GlobalMessages) />
 </div>
@@ -65,7 +64,6 @@ exports[`should render correctly: with identity providers 1`] = `
   <LoginForm
     collapsed={true}
     onSubmit={[MockFunction]}
-    returnTo=""
   />
   <Connect(GlobalMessages) />
 </div>
@@ -84,7 +82,6 @@ exports[`should render correctly: without any identity providers 1`] = `
   <LoginForm
     collapsed={false}
     onSubmit={[MockFunction]}
-    returnTo=""
   />
   <Connect(GlobalMessages) />
 </div>
index 37c0c142daf76c0b9142cc4b6007d1f9dec4ea35..7e057bf0cbc2918bbd97d3c46379411d75d79ef1 100644 (file)
@@ -28,6 +28,7 @@ import PageHeader from './PageHeader';
 import WebhooksList from './WebhooksList';
 
 interface Props {
+  // eslint-disable-next-line react/no-unused-prop-types
   component?: LightComponent;
 }
 
index cab1a4a622a909935226ec3621d0563f81ae3522..e2e41a161657adfc9f3da4f5013a741652f0d28b 100644 (file)
@@ -588,7 +588,6 @@ export default class SourceViewerBase extends React.PureComponent<Props, State>
     return (
       <SourceViewerCode
         branchLike={this.props.branchLike}
-        componentKey={this.props.component}
         displayAllIssues={this.props.displayAllIssues}
         displayIssueLocationsCount={this.props.displayIssueLocationsCount}
         displayIssueLocationsLink={this.props.displayIssueLocationsLink}
index ebeb526fff67e481003b2048796304a8bfb9ed9b..e3e604671b6cbf609b1c7a29bd89ecf1a9afb53c 100644 (file)
@@ -48,7 +48,6 @@ const ZERO_LINE = {
 
 interface Props {
   branchLike: BranchLike | undefined;
-  componentKey: string;
   displayAllIssues?: boolean;
   displayIssueLocationsCount?: boolean;
   displayIssueLocationsLink?: boolean;
index 605f29a1930735cda5ee6e443d7befe65fa59e0b..e51a763b9df8f2c1aba39ec731389487cda3dce3 100644 (file)
@@ -82,7 +82,6 @@ function shallowRender(props: Partial<SourceViewerCode['props']> = {}) {
   return shallow<SourceViewerCode>(
     <SourceViewerCode
       branchLike={mockBranch()}
-      componentKey="foo"
       duplications={[]}
       duplicationsByLine={[]}
       hasSourcesAfter={false}
index 6c3cbd2af18e45d3b290d1c20d706a60e7e00700..62e0125c3dee51a8b1bea49b5d52734c55cb2c73 100644 (file)
@@ -43,7 +43,6 @@ exports[`should render correctly 1`] = `
           "name": "master",
         }
       }
-      componentKey="my-component"
       displayAllIssues={false}
       displayIssueLocationsCount={true}
       displayIssueLocationsLink={true}
index 9871e117e645713c7759575d9703f9d0a326ad8a..29dfd8d6fb88c16f4c0fc0d8c6d16a8bbba875af 100644 (file)
@@ -29,7 +29,6 @@ import AddGraphMetricPopup from './AddGraphMetricPopup';
 
 interface Props {
   addMetric: (metric: string) => void;
-  className?: string;
   metrics: Metric[];
   metricsTypeFilter?: string[];
   removeMetric: (metric: string) => void;
index 1d0faa676e3a44e0159c26a6a15011ab82bdb073..318f96634e26e1e5b1ab32636fdb4af0cfb0722a 100644 (file)
@@ -77,7 +77,6 @@ export default class GraphsHeader extends React.PureComponent<Props> {
           removeCustomMetric !== undefined && (
             <AddGraphMetric
               addMetric={addCustomMetric}
-              className="pull-left spacer-left"
               metrics={metrics}
               metricsTypeFilter={metricsTypeFilter}
               removeMetric={removeCustomMetric}
index 1e46688c8724123ccda8d585882560e0663c5124..d2d815dda671e32e195259bac0c70bab98b9fa0f 100644 (file)
@@ -29,6 +29,7 @@ export interface MultiSelectProps {
   allowNewElements?: boolean;
   allowSelection?: boolean;
   elements: string[];
+  // eslint-disable-next-line react/no-unused-prop-types
   filterSelected?: (query: string, selectedElements: string[]) => string[];
   footerNode?: React.ReactNode;
   listSize?: number;
index 6169627f2366bfd8e5dc5694fd88ad6c620e8196..2e8f9473d2c3cdfff99a1f672d90be029165f23c 100644 (file)
@@ -22,7 +22,6 @@ import { translate, translateWithParameters } from '../../helpers/l10n';
 import { formatMeasure } from '../../helpers/measures';
 
 interface Props {
-  className?: string;
   count: number;
   showMore: () => void;
   showLess: (() => void) | undefined;
index 8d0206d1113505be912643354e2ced7fb4819a4b..74da63a02286eecd87f1d8b5c9fc8e8b671f4eda 100644 (file)
@@ -17,6 +17,9 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+/* eslint-disable react/no-unused-prop-types */
+
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { rawSizes } from '../../../app/theme';