Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/jsx-no-bind */
import classNames from 'classnames'
import React from 'react'
import 'storybook-addon-designs'
Expand Down
3 changes: 0 additions & 3 deletions client/browser/src/shared/code-hosts/shared/codeHost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,6 @@ export function handleCodeHost({
repoExistsOrError={repoExistsOrError}
showSignInButton={showSignInButton}
// The bound function is constant
// eslint-disable-next-line react/jsx-no-bind
onSignInClose={nextSignInClose}
onConfigureSourcegraphClick={isInPage ? undefined : onConfigureSourcegraphClick}
/>,
Expand Down Expand Up @@ -818,7 +817,6 @@ export function handleCodeHost({
extensionsController={extensionsController}
buttonProps={codeViewEvent.toolbarButtonProps}
// The bound function is constant
// eslint-disable-next-line react/jsx-no-bind
onSignInClose={nextSignInClose}
location={H.createLocation(window.location)}
/>,
Expand Down Expand Up @@ -1155,7 +1153,6 @@ export function handleCodeHost({
location={H.createLocation(window.location)}
scope={scopeEditor}
// The bound function is constant
// eslint-disable-next-line react/jsx-no-bind
onSignInClose={nextSignInClose}
/>,
mount
Expand Down
2 changes: 0 additions & 2 deletions client/sandboxes/code-insights/src/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export function App(): ReactElement {
}
>
<Switch>
{/* eslint-disable react/jsx-no-bind */}
{routes.map(({ render, ...route }) => (
<Route
{...route}
Expand All @@ -76,7 +75,6 @@ export function App(): ReactElement {
))}

<Redirect to="/insights" />
{/* eslint-enable react/jsx-no-bind */}
</Switch>
</Suspense>
</InsightsApiContext.Provider>
Expand Down
1 change: 0 additions & 1 deletion client/shared/src/components/VirtualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class VirtualList<TItem, TExtraItemProps = undefined> extends React.PureC
<div className={this.props.className} ref={this.props.onRef}>
{this.props.items.slice(0, this.props.itemsToShow).map((item, index) => (
<VisibilitySensor
// eslint-disable-next-line react/jsx-no-bind
onChange={isVisible => this.onChangeVisibility(isVisible, index)}
key={this.props.itemKey(item)}
containment={this.props.containment}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const RedesignToggleStorybook = (): ReactElement => {
key="redesign-toolbar"
active={isRedesignEnabled}
title={isRedesignEnabled ? 'Disable redesign theme' : 'Enable redesign theme'}
// eslint-disable-next-line react/jsx-no-bind
onClick={handleRedesignToggle}
>
<Icons icon="beaker" />
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ export const Layout: React.FunctionComponent<LayoutProps> = props => {
}
>
<Switch>
{/* eslint-disable react/jsx-no-bind */}
{props.routes.map(
({ render, condition = () => true, ...route }) =>
condition(context) && (
Expand All @@ -330,7 +329,6 @@ export const Layout: React.FunctionComponent<LayoutProps> = props => {
/>
)
)}
{/* eslint-enable react/jsx-no-bind */}
</Switch>
</Suspense>
</ErrorBoundary>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/SourcegraphWebApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ class ColdSourcegraphWebApp extends React.Component<SourcegraphWebAppProps, Sour
<ErrorBoundary location={null}>
<ShortcutProvider>
<BrowserRouter key={0}>
{/* eslint-disable react/jsx-no-bind */}
<Route
path="/"
render={routeComponentProps => (
Expand Down Expand Up @@ -529,7 +528,6 @@ class ColdSourcegraphWebApp extends React.Component<SourcegraphWebAppProps, Sour
/>
)}
/>
{/* eslint-enable react/jsx-no-bind */}
</BrowserRouter>
<Tooltip key={1} />
<Notifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ interface AuthenticatedProps extends Props {

export const AuthenticatedBatchChangesArea = withAuthenticatedUser<AuthenticatedProps>(({ match, ...outerProps }) => (
<Page>
{/* eslint-disable react/jsx-no-bind */}
<Switch>
<Route render={props => <BatchChangeListPage {...outerProps} {...props} />} path={match.url} exact={true} />
<Route
Expand All @@ -87,7 +86,6 @@ export const AuthenticatedBatchChangesArea = withAuthenticatedUser<Authenticated
/>
<Route component={NotFoundPage} key="hardcoded-key" />
</Switch>
{/* eslint-enable react/jsx-no-bind */}
</Page>
))

Expand All @@ -99,7 +97,6 @@ export const NamespaceBatchChangesArea = withAuthenticatedUser<
NamespaceBatchChangesAreaProps & { authenticatedUser: AuthenticatedUser }
>(({ match, namespaceID, ...outerProps }) => (
<Page>
{/* eslint-disable react/jsx-no-bind */}
<Switch>
<Route
path={`${match.url}/apply/:specID`}
Expand Down Expand Up @@ -139,6 +136,5 @@ export const NamespaceBatchChangesArea = withAuthenticatedUser<
exact={true}
/>
</Switch>
{/* eslint-enable react/jsx-no-bind */}
</Page>
))
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const AuthenticatedCodeMonitoringArea = withAuthenticatedUser<Authenticat
return (
<div className="w-100">
<Page>
{/* eslint-disable react/jsx-no-bind */}
<Switch>
<Route
render={props => <CodeMonitoringPage {...outerProps} {...props} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const RegistryArea: React.FunctionComponent<Props> = ({
return (
<div className="registry-area">
<Switch>
{/* eslint-disable react/jsx-no-bind */}
<Route
path={`${match.url}/new`}
key="hardcoded-key" // see https://github.com/ReactTraining/react-router/issues/4578#issuecomment-334489490
Expand All @@ -52,7 +51,7 @@ export const RegistryArea: React.FunctionComponent<Props> = ({
<RegistryNewExtensionPage {...routeComponentProps} {...transferProps} />
)}
/>
{/* eslint-enable react/jsx-no-bind */}

<Route key="hardcoded-key" component={NotFoundPage} />
</Switch>
</div>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/extensions/ExtensionsArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export const ExtensionsArea: React.FunctionComponent<ExtensionsAreaProps> = prop
/>
<Switch>
{props.routes.map(
/* eslint-disable react/jsx-no-bind */
({ path, exact, condition = () => true, render }) =>
condition(context) && (
<Route
Expand All @@ -101,7 +100,6 @@ export const ExtensionsArea: React.FunctionComponent<ExtensionsAreaProps> = prop
render={routeComponentProps => render({ ...context, ...routeComponentProps })}
/>
)
/* eslint-enable react/jsx-no-bind */
)}
<Route key="hardcoded-key" component={NotFoundPage} />
</Switch>
Expand Down
8 changes: 1 addition & 7 deletions client/web/src/extensions/ExtensionsQueryInputToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,16 @@ export const ExtensionsQueryInputToolbar: React.FunctionComponent<Props> = ({
{enablementFilterToLabel[enablementFilter]}
</DropdownToggle>
<DropdownMenu right={true}>
<DropdownItem
// eslint-disable-next-line react/jsx-no-bind
onClick={() => setEnablementFilter('all')}
disabled={enablementFilter === 'all'}
>
<DropdownItem onClick={() => setEnablementFilter('all')} disabled={enablementFilter === 'all'}>
Show all
</DropdownItem>
<DropdownItem
// eslint-disable-next-line react/jsx-no-bind
onClick={() => setEnablementFilter('enabled')}
disabled={enablementFilter === 'enabled'}
>
Show enabled extensions
</DropdownItem>
<DropdownItem
// eslint-disable-next-line react/jsx-no-bind
onClick={() => setEnablementFilter('disabled')}
disabled={enablementFilter === 'disabled'}
>
Expand Down
1 change: 0 additions & 1 deletion client/web/src/extensions/components/ActionItemsBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export const ActionItemsBar = React.memo<ActionItemsBarProps>(props => {
return (
<div className="action-items__bar p-0 border-left position-relative d-flex flex-column" ref={barReference}>
{/* To be clear to users that this isn't an error reported by extensions about e.g. the code they're viewing. */}
{/* eslint-disable-next-line react/jsx-no-bind */}
<ErrorBoundary location={props.location} render={error => <span>Component error: {error.message}</span>}>
<ActionItemsDivider />
{canScrollNegative && (
Expand Down
1 change: 0 additions & 1 deletion client/web/src/extensions/components/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export const StatusBar: React.FunctionComponent<StatusBarProps> = ({
location={location}
// To be clear to users that this isn't an error reported by extensions
// about e.g. the code they're viewing.
// eslint-disable-next-line react/jsx-no-bind
render={error => (
<div className="status-bar__item ml-2">
<small className="text-muted">Status bar component error: {error.message}</small>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/extensions/extension/ExtensionArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ export class ExtensionArea extends React.Component<ExtensionAreaProps> {
<React.Suspense fallback={<LoadingSpinner className="icon-inline m-2" />}>
<Switch>
{this.props.routes.map(
/* eslint-disable react/jsx-no-bind */
({ path, render, exact, condition = () => true }) =>
condition(context) && (
<Route
Expand All @@ -239,7 +238,6 @@ export class ExtensionArea extends React.Component<ExtensionAreaProps> {
}
/>
)
/* eslint-enable react/jsx-no-bind */
)}
<Route key="hardcoded-key" component={NotFoundPage} />
</Switch>
Expand Down
3 changes: 0 additions & 3 deletions client/web/src/insights/InsightsRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const InsightsRouter: React.FunctionComponent<InsightsRouterProps> = prop
return (
<Switch>
<Route
/* eslint-disable-next-line react/jsx-no-bind */
render={props => (
<InsightsLazyPage isCreationUIEnabled={isCreationUIEnabled} {...outerProps} {...props} />
)}
Expand All @@ -64,13 +63,11 @@ export const InsightsRouter: React.FunctionComponent<InsightsRouterProps> = prop
<>
<Route
path={`${match.url}/create-search-insight`}
/* eslint-disable-next-line react/jsx-no-bind */
render={props => <SearchInsightCreationLazyPage {...outerProps} {...props} />}
/>

<Route
path={`${match.url}/create-lang-stats-insight`}
/* eslint-disable-next-line react/jsx-no-bind */
render={props => <LangStatsInsightCreationLazyPage {...outerProps} {...props} />}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export const FormSeries: React.FunctionComponent<FormSeriesProps> = props => {
// In case if we don't have series we have to skip series list ui (components below)
// and render simple series form component.
if (series.length === 0) {
/* eslint-disable react/jsx-no-bind */
return <FormSeriesInput autofocus={false} className="card card-body p-3" onSubmit={handleSubmitNewSeries} />
}

Expand Down
2 changes: 0 additions & 2 deletions client/web/src/org/OrgsArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ interface Props
* Renders a layout of a sidebar and a content area to display organization-related pages.
*/
export const OrgsArea: React.FunctionComponent<Props> = props => (
/* eslint-disable react/jsx-no-bind */
<Switch>
<Route path={`${props.match.url}/new`} component={NewOrganizationPage} exact={true} />
<Route
Expand All @@ -55,5 +54,4 @@ export const OrgsArea: React.FunctionComponent<Props> = props => (
/>
<Route component={NotFoundPage} />
</Switch>
/* eslint-enable react/jsx-no-bind */
)
2 changes: 0 additions & 2 deletions client/web/src/org/area/OrgArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ export class OrgArea extends React.Component<Props> {
<React.Suspense fallback={<LoadingSpinner className="icon-inline m-2" />}>
<Switch>
{this.props.orgAreaRoutes.map(
/* eslint-disable react/jsx-no-bind */
({ path, exact, render, condition = () => true }) =>
condition(context) && (
<Route
Expand All @@ -264,7 +263,6 @@ export class OrgArea extends React.Component<Props> {
}
/>
)
/* eslint-enable react/jsx-no-bind */
)}
<Route key="hardcoded-key" component={NotFoundPage} />
</Switch>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/org/settings/OrgSettingsArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const OrgSettingsArea: React.FunctionComponent<Props> = props => {
<ErrorBoundary location={props.location}>
<React.Suspense fallback={<LoadingSpinner className="icon-inline m-2" />}>
<Switch>
{/* eslint-disable react/jsx-no-bind */}
<Route
path={props.match.path}
key="hardcoded-key" // see https://github.com/ReactTraining/react-router/issues/4578#issuecomment-334489490
Expand Down Expand Up @@ -88,7 +87,6 @@ export const OrgSettingsArea: React.FunctionComponent<Props> = props => {
)}
/>
<Route component={NotFoundPage} />
{/* eslint-enable react/jsx-no-bind */}
</Switch>
</React.Suspense>
</ErrorBoundary>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/org/settings/members/InviteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,12 @@ export const InviteForm: React.FunctionComponent<Props> = ({
</DismissibleAlert>
)}
{invited.map((invite, index) => (
/* eslint-disable react/jsx-no-bind */
<InvitedNotification
key={index}
{...invite}
className="alert alert-success invite-form__alert"
onDismiss={() => dismissNotification(index)}
/>
/* eslint-enable react/jsx-no-bind */
))}
{isErrorLike(loading) && <ErrorAlert className="invite-form__alert" error={loading} />}
</div>
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/repo/RepoContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ export const RepoContainer: React.FunctionComponent<RepoContainerProps> = props
</RepoHeaderContributionPortal>
<ErrorBoundary location={props.location}>
<Switch>
{/* eslint-disable react/jsx-no-bind */}
{[
'',
...(rawRevision ? [`@${rawRevision}`] : []), // must exactly match how the revision was encoded in the URL
Expand Down Expand Up @@ -478,7 +477,6 @@ export const RepoContainer: React.FunctionComponent<RepoContainerProps> = props
)
)}
<Route key="hardcoded-key" component={RepoPageNotFound} />
{/* eslint-enable react/jsx-no-bind */}
</Switch>
</ErrorBoundary>
</div>
Expand Down
1 change: 0 additions & 1 deletion client/web/src/repo/RepoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export const RepoHeader: React.FunctionComponent<Props> = ({
location={props.location}
// To be clear to users that this isn't an error reported by extensions
// about e.g. the code they're viewing.
// eslint-disable-next-line react/jsx-no-bind
render={error => (
<ul className="navbar-nav">
<li className="nav-item repo-header__action-list-item">
Expand Down
1 change: 0 additions & 1 deletion client/web/src/repo/RepoRevisionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ export const RepoRevisionContainer: React.FunctionComponent<RepoRevisionContaine
return (
<div className="repo-revision-container">
<Switch>
{/* eslint-disable react/jsx-no-bind */}
{props.routes.map(
({ path, render, exact, condition = () => true }) =>
condition(context) && (
Expand Down
1 change: 0 additions & 1 deletion client/web/src/repo/RevisionsPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export const RevisionsPopover: React.FunctionComponent<Props> = props => {
compact={true}
noun={tab.noun}
pluralNoun={tab.pluralNoun}
// eslint-disable-next-line react/jsx-no-bind
queryConnection={queryRepositoryCommits}
nodeComponent={GitCommitNode}
nodeComponentProps={{
Expand Down
2 changes: 0 additions & 2 deletions client/web/src/repo/branches/RepositoryBranchesArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const RepositoryBranchesArea: React.FunctionComponent<Props> = ({ useBrea
<div className="repository-branches-area container">
<RepositoryBranchesNavbar className="my-3" repo={repo.name} />
<Switch>
{/* eslint-disable react/jsx-no-bind */}
<Route
path={`${match.url}`}
key="hardcoded-key" // see https://github.com/ReactTraining/react-router/issues/4578#issuecomment-334489490
Expand All @@ -73,7 +72,6 @@ export const RepositoryBranchesArea: React.FunctionComponent<Props> = ({ useBrea
)}
/>
<Route key="hardcoded-key" component={NotFoundPage} />
{/* eslint-enable react/jsx-no-bind */}
</Switch>
</div>
)
Expand Down
Loading