Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update typescript-eslint monorepo to v8 (major) #580

Merged
merged 2 commits into from
Oct 11, 2024
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
4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"@types/nodemailer": "^6.4.15",
"@types/passport-jwt": "*",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@ufb/eslint-config": "workspace:*",
"@ufb/prettier-config": "workspace:*",
"@ufb/tsconfig": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/domains/admin/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class AuthService {
CodeTypeEnum.EMAIL_VEIRIFICATION,
dto.email,
);
} catch (error) {
} catch {
throw new BadRequestException('must request email verification');
}
if (!isVerified) throw new NotVerifiedEmailException();
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/domains/admin/feedback/feedback.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ export class FeedbackService {
);

return imageUrlsByKeys;
} catch (e) {
} catch {
throw new InternalServerErrorException('failed to upload images');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class MemberService {

try {
await this.userService.findById(userId);
} catch (error) {
} catch {
throw new MemberInvalidUserException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class SchedulerLockService {
const hasLock =
lock && lock.serverId === this.serverId && lock.timestamp > new Date();
return hasLock;
} catch (error) {
} catch {
return false;
}
}
Expand Down
8 changes: 4 additions & 4 deletions apps/api/src/test-utils/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ export const optionFixture = {
id: faker.number.int(),
key: faker.string.sample(),
name: faker.string.sample(),
field: fieldsFixture.filter((field) => {
return [FieldFormatEnum.select, FieldFormatEnum.multiSelect].includes(
field: fieldsFixture.find((field) =>
[FieldFormatEnum.select, FieldFormatEnum.multiSelect].includes(
field.format,
);
})[0],
),
),
} as OptionEntity;

export const issueFixture = {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/api-key/api-key-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getApiKeyColumns = (
title: <Trans i18nKey="toast.copy" />,
iconName: 'CopyFill',
});
} catch (error) {
} catch {
toast.negative({ title: 'fail' });
}
}}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/member/member.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { z } from 'zod';
import { roleSchema } from '../role';
import { userSchema } from '../user/user.schema';

const memberSchema = z.object({
export const memberSchema = z.object({
id: z.number(),
user: userSchema.pick({
id: true,
Expand Down
12 changes: 1 addition & 11 deletions apps/web/src/server/api-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@
*/
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';

const METHOD_LIST = [
'GET',
'POST',
'PUT',
'DELETE',
'PATCH',
'HEAD',
'OPTIONS',
] as const;

type Method = (typeof METHOD_LIST)[number];
type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';

type CustomNextApiRequest<T = Record<string, unknown>> = Omit<
NextApiRequest,
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/shared/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class client {
failedRequest.response.config.headers.setAuthorization(
`Bearer ${data.accessToken}`,
);
} catch (error) {
} catch {
await axios.get('/api/logout');
sessionStorage.removeItem('jwt');
window.location.assign(Path.SIGN_IN);
Expand All @@ -68,6 +68,7 @@ class client {
this.axiosInstance.interceptors.response.use(
(response) => response,
(error: { response?: AxiosResponse }) =>
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
Promise.reject(error.response?.data ?? error),
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shared/ui/share-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ShareButton: React.FC<IProps> = ({ pathname }) => {
const { origin } = window.location;
await navigator.clipboard.writeText(`${origin}${pathname}`);
toast.positive({ title: t('toast.copy'), iconName: 'CopyFill' });
} catch (error) {
} catch {
toast.negative({ title: 'fail' });
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const objToQuery = (
result[key] = value;
break;
}
} catch (error) {
} catch {
result[key] = undefined;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const TableSearchInput: React.FC<IProps> = (props) => {
startIndex + 1,
startIndex === endIndex ? inputValue.length : endIndex,
);
return value.indexOf(':') === -1 ?
return !value.includes(':') ?
''
: value.slice(0, value.indexOf(':')).trim();
}, [inputValue, inputRef]);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/widgets/issue-table/ui/ticket-link.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const TicketLink: React.FC<IProps> = ({ value, projectId }) => {
`/browse/${issueTracker.data.ticketKey}-${value}`,
issueTracker.data.ticketDomain,
).toString();
} catch (error) {
} catch {
return '';
}
}, [issueTracker]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const FieldSetting: React.FC<IProps> = ({ channelId, projectId }) => {
if (router.pathname !== url && !confirm(confirmMsg)) {
router.events.emit('routeChangeError');

throw `사이트 변경 취소`;
throw new Error(`사이트 변경 취소`);
}
};
router.events.on('routeChangeStart', handleBeforeChangeRoute);
Expand Down
Loading
Loading