From 5a4609d29aeb9b82d479e7bea003628772cd396d Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 13 Oct 2022 20:55:51 +0000 Subject: [PATCH] refactor: clean up api/error.ts This removes an eslint-disable lint and updates the `err` type to `unknown` instead of `any` which is more correct. --- site/src/api/errors.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/src/api/errors.ts b/site/src/api/errors.ts index 19807dccfdb97..1663e0333dabb 100644 --- a/site/src/api/errors.ts +++ b/site/src/api/errors.ts @@ -23,8 +23,7 @@ export type ApiError = AxiosError & { response: AxiosResponse } -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -export const isApiError = (err: any): err is ApiError => { +export const isApiError = (err: unknown): err is ApiError => { if (axios.isAxiosError(err)) { const response = err.response?.data if (!response) {