chore: fix lint warnings (#385)

This commit is contained in:
Samuel Gunter
2024-10-22 21:47:35 -05:00
committed by GitHub
parent 643ea13207
commit eb306787ae
9 changed files with 19 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ export default function PopupMain(): JSX.Element {
}, []);
const [activeSchedule, schedules] = useSchedules();
const [isRefreshing, setIsRefreshing] = useState(false);
// const [isRefreshing, setIsRefreshing] = useState(false);
const [funny, setFunny] = useState<string>('');
useEffect(() => {

View File

@@ -47,7 +47,7 @@ function makeGridRow(row: number, cols: number): JSX.Element {
*/
export default function CalendarGrid({
courseCells,
saturdayClass, // TODO: implement/move away from props
saturdayClass: _saturdayClass, // TODO: implement/move away from props
setCourse,
}: React.PropsWithChildren<Props>): JSX.Element {
return (

View File

@@ -58,7 +58,7 @@ export function Chip({ variant, label }: React.PropsWithChildren<Props>): JSX.El
default:
labelMap = {};
}
const longName = Object.entries(labelMap).find(([full, short]) => short === label)?.[0] ?? label;
const longName = Object.entries(labelMap).find(([_full, short]) => short === label)?.[0] ?? label;
return (
<Text

View File

@@ -14,7 +14,7 @@ type Props = TextProps<'a'> & {
* A reusable Text component with props that build on top of the design system for the extension
*/
export default function Link(props: PropsWithChildren<Props>): JSX.Element {
let { className, href, ...passedProps } = props;
const { className, href, ...passedProps } = props;
if (href && !props.onClick) {
passedProps.onClick = e => {
@@ -37,7 +37,7 @@ export default function Link(props: PropsWithChildren<Props>): JSX.Element {
'underline cursor-pointer': !isDisabled,
'cursor-not-allowed color-ut-gray': isDisabled,
},
props.className
className
)}
/>
);

View File

@@ -79,11 +79,11 @@ const useDevMode = (targetCount: number): [boolean, () => void] => {
* @returns The Settings component.
*/
export default function Settings(): JSX.Element {
const [enableCourseStatusChips, setEnableCourseStatusChips] = useState<boolean>(false);
const [showTimeLocation, setShowTimeLocation] = useState<boolean>(false);
const [_enableCourseStatusChips, setEnableCourseStatusChips] = useState<boolean>(false);
const [_showTimeLocation, setShowTimeLocation] = useState<boolean>(false);
const [highlightConflicts, setHighlightConflicts] = useState<boolean>(false);
const [loadAllCourses, setLoadAllCourses] = useState<boolean>(false);
const [enableDataRefreshing, setEnableDataRefreshing] = useState<boolean>(false);
const [_enableDataRefreshing, setEnableDataRefreshing] = useState<boolean>(false);
const showMigrationDialog = useMigrationDialog();
@@ -216,6 +216,7 @@ export default function Settings(): JSX.Element {
try {
response = await fetch(link);
} catch (e) {
// eslint-disable-next-line no-alert
alert(`Failed to fetch url '${link}'`);
return;
}