Skip to content

Commit 66f22e4

Browse files
fixing lint errors (#17156)
1 parent f4babd3 commit 66f22e4

16 files changed

+33
-32
lines changed

components/dashboard/src/admin/License.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import { getGitpodService } from "../service/service";
1111
import { ReactComponent as Alert } from "../images/exclamation.svg";
1212
import { ReactComponent as Success } from "../images/check-circle.svg";
1313
import { LicenseInfo } from "@gitpod/gitpod-protocol";
14-
import { ReactComponent as XSvg } from "../images/x.svg";
15-
import { ReactComponent as CheckSvg } from "../images/check.svg";
16-
import { ReactComponent as LinkSvg } from "../images/external-link.svg";
1714
import SolidCard from "../components/SolidCard";
1815
import Card from "../components/Card";
1916
import { isGitpodIo } from "../utils";

components/dashboard/src/admin/ProjectsSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function ProjectsSearch() {
5050
} else {
5151
setCurrentProject(undefined);
5252
}
53+
// eslint-disable-next-line react-hooks/exhaustive-deps
5354
}, [location]);
5455

5556
useEffect(() => {

components/dashboard/src/admin/Settings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default function Settings() {
4444
const setting = await getGitpodService().server.adminGetSettings();
4545
setAdminSettings(setting);
4646
})();
47+
// eslint-disable-next-line react-hooks/exhaustive-deps
4748
}, []);
4849

4950
const actuallySetTelemetryPrefs = async (value: InstallationAdminSettings) => {

components/dashboard/src/admin/TeamsSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export function TeamsSearch() {
5252
} else {
5353
setCurrentTeam(undefined);
5454
}
55+
// eslint-disable-next-line react-hooks/exhaustive-deps
5556
}, [location]);
5657

5758
if (currentTeam) {

components/dashboard/src/admin/UserDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ function renderBillingModeProperty(billingMode?: BillingMode): JSX.Element {
473473
>
474474
<p className="flex justify-left text-gitpod-red">
475475
<span>UBP blocked by:</span>
476-
<img className="m-2" src={CaretDown} />
476+
<img className="m-2" src={CaretDown} alt="caret icon pointing down" />
477477
</p>
478478
</ContextMenu>
479479
)}

components/dashboard/src/admin/UserSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default function UserSearch() {
4040
} else {
4141
setCurrentUserState(undefined);
4242
}
43+
// eslint-disable-next-line react-hooks/exhaustive-deps
4344
}, [location]);
4445

4546
if (currentUser) {

components/dashboard/src/admin/WorkspacesSearch.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ export function WorkspaceSearch(props: Props) {
6666
} else {
6767
setCurrentWorkspaceState(undefined);
6868
}
69+
// eslint-disable-next-line react-hooks/exhaustive-deps
6970
}, [location]);
7071

7172
useEffect(() => {
7273
if (props.user) {
7374
search();
7475
}
76+
// eslint-disable-next-line react-hooks/exhaustive-deps
7577
}, [props.user]);
7678

7779
if (currentWorkspace) {

components/dashboard/src/components/ConfirmationModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function ConfirmationModal(props: {
3535
const buttonDisabled = useRef(props.buttonDisabled);
3636
useEffect(() => {
3737
buttonDisabled.current = props.buttonDisabled;
38+
// eslint-disable-next-line react-hooks/exhaustive-deps
3839
}, []);
3940

4041
return (

components/dashboard/src/components/ContextMenu.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ export interface ContextMenuEntry {
3636
function ContextMenu(props: ContextMenuProps) {
3737
const [expanded, setExpanded] = useState(false);
3838

39-
const { changeMenuState } = props;
40-
41-
useEffect(() => {
42-
return () => {
43-
if (changeMenuState) {
44-
changeMenuState(!expanded);
45-
}
46-
};
47-
}, [expanded]);
48-
4939
const toggleExpanded = () => {
5040
setExpanded(!expanded);
5141
if (props.changeMenuState) {
@@ -80,6 +70,7 @@ function ContextMenu(props: ContextMenuProps) {
8070
window.removeEventListener("keydown", keydownHandler);
8171
window.removeEventListener("click", clickHandler);
8272
};
73+
// eslint-disable-next-line react-hooks/exhaustive-deps
8374
}, []); // Empty array ensures that effect is only run on mount and unmount
8475

8576
// Default 'children' is the three dots hamburger button.

components/dashboard/src/components/DropDown2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const DropDown2: FunctionComponent<DropDown2Props> = (props) => {
108108
e.preventDefault();
109109
}
110110
},
111-
[filteredOptions, props, selectedElementTemp, setFocussedElement, showDropDown, toggleDropDown],
111+
[filteredOptions, props, search, selectedElementTemp, setFocussedElement, showDropDown, toggleDropDown],
112112
);
113113

114114
const handleBlur = useCallback(

0 commit comments

Comments
 (0)