Skip to content

Commit

Permalink
Merge pull request #10 from SkyLightQP/develop
Browse files Browse the repository at this point in the history
fix: fix dependency versions and add check-lint job
  • Loading branch information
SkyLightQP authored Mar 1, 2024
2 parents 37c666a + 2519b44 commit 4abddd0
Show file tree
Hide file tree
Showing 7 changed files with 1,375 additions and 499 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ env:
NAME: daegyeome

jobs:
check-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout the source code.
uses: actions/checkout@master

- name: Install dependencies
run: yarn install

- name: Run eslint
run: yarn run lint
deploy:
runs-on: self-hosted
steps:
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@
},
"devDependencies": {
"@types/node": "^20.11.24",
"@types/react": "^18.2.61",
"@types/react": "~18.0.28",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"eslint": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "^12.2.2",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-config-next": "^14.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.7.1",
"typescript": "5.3.3"
"prettier": "^3.2.5",
"typescript": "4.9.5"
},
"browserslist": {
"production": [
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dialogs/UpdateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
import { SubmitHandler, useForm } from 'react-hook-form';
import VerticalGap from '../VerticalGap';

/* eslint-disable @typescript-eslint/no-explicit-any */

interface FieldType {
readonly id: string;
readonly label: string;
Expand Down
8 changes: 4 additions & 4 deletions src/components/DraggableTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DraggableTable = <T extends { id: number; isHidden?: boolean }>({
<Thead>
<Tr>
{columns.map(({ key, label }) => (
<Th key={`label-${key}`}>{label}</Th>
<Th key={`label-${String(key)}`}>{label}</Th>
))}
<Th />
</Tr>
Expand All @@ -58,14 +58,14 @@ const DraggableTable = <T extends { id: number; isHidden?: boolean }>({
{columns.map(({ key, isDate, render }) => {
if (isDate)
return (
<Td key={`column-${key}-${item.id}`}>
<Td key={`column-${String(key)}-${item.id}`}>
{new Date(String(item[key])).toLocaleDateString()}
</Td>
);
if (render) {
return <Fragment key={`column-${key}-${item.id}`}>{render(item)}</Fragment>;
return <Fragment key={`column-${String(key)}-${item.id}`}>{render(item)}</Fragment>;
}
return <Td key={`column-${key}-${item.id}`}>{String(item[key])}</Td>;
return <Td key={`column-${String(key)}-${item.id}`}>{String(item[key])}</Td>;
})}
<Td isNumeric>
<ButtonGroup isAttached>
Expand Down
5 changes: 2 additions & 3 deletions src/components/MoreLink/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** @jsxImportSource @emotion/react */
import { css } from '@emotion/react';
import { css } from '@emotion/css';
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faAt, faCode, faLink, faPencilAlt } from '@fortawesome/free-solid-svg-icons';
Expand Down Expand Up @@ -48,7 +47,7 @@ const MoreLink: React.FC = () => {
tabIndex={0}
onKeyUp={(e) => e.key === 'Enter' && onEmailClick()}
onClick={onEmailClick}
css={css`
className={css`
cursor: pointer;
&:hover {
text-decoration: underline;
Expand Down
14 changes: 8 additions & 6 deletions src/pages/admin/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ const Login: React.FC = () => {
return;
}
if (data.user !== null && data.session !== null) await router.push('/admin');
} catch (e) {
toast({
title: 'Error',
description: e.message,
status: 'error'
});
} catch (e: unknown) {
if (e instanceof Error) {
toast({
title: 'Error',
description: e.message,
status: 'error'
});
}
}
};

Expand Down
Loading

0 comments on commit 4abddd0

Please sign in to comment.