Skip to content

Commit 78da40d

Browse files
authored
Merge pull request #475 from Gwasuwon-shot/fix#449-eslintEdit
Fix#449 eslint edit
2 parents 0e4d6c6 + 553e064 commit 78da40d

File tree

114 files changed

+1368
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1368
-577
lines changed

.eslintrc.cjs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
module.exports = {
22
parser: "@typescript-eslint/parser",
3-
plugins: ["@typescript-eslint", "prettier"],
3+
parserOptions: {
4+
ecmaVersion: 2020,
5+
sourceType: "module",
6+
},
7+
settings: {
8+
react: {
9+
version: "detect",
10+
},
11+
},
12+
plugins: ["@typescript-eslint", "prettier", "react", "simple-import-sort"],
413
extends: [
514
"airbnb",
615
"plugin:import/errors",
716
"plugin:import/warnings",
817
"plugin:prettier/recommended",
918
"plugin:@typescript-eslint/recommended",
10-
"prettier/@typescript-eslint",
19+
"plugin:react/recommended",
20+
"prettier",
1121
],
1222
rules: {
1323
"linebreak-style": 0,
@@ -22,6 +32,7 @@ module.exports = {
2232
"eol-last": ["error", "always"], // line의 가장 마지막 줄에는 개행 넣기
2333
"react/react-in-jsx-scope": "off",
2434
"no-multi-spaces": "error", // 스페이스 여러개 금지
25-
"simple-import-sort/imports": "error"
35+
"simple-import-sort/imports": "error",
36+
"no-use-before-define": ["error", false],
2637
},
2738
};

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.19.0
1+
v18.20.3

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
9-
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9+
"lint": "eslint",
1010
"stylelint": "stylelint './src/**/*.tsx' --fix",
1111
"preview": "vite preview"
1212
},
@@ -59,13 +59,20 @@
5959
"@typescript-eslint/parser": "^5.59.0",
6060
"@vitejs/plugin-react": "^4.0.0",
6161
"eslint": "^8.44.0",
62-
"eslint-plugin-react-hooks": "^4.6.0",
62+
"eslint-config-airbnb": "^19.0.4",
63+
"eslint-config-prettier": "^9.1.0",
64+
"eslint-plugin-import": "^2.29.1",
65+
"eslint-plugin-jsx-a11y": "^6.8.0",
66+
"eslint-plugin-prettier": "^5.1.3",
67+
"eslint-plugin-react": "^7.34.2",
68+
"eslint-plugin-react-hooks": "^4.6.2",
6369
"eslint-plugin-react-refresh": "^0.3.4",
70+
"eslint-plugin-simple-import-sort": "^12.1.0",
6471
"postcss": "^8.4.25",
6572
"postcss-styled-syntax": "^0.4.0",
6673
"prettier": "^3.0.0",
6774
"slick-carousel": "^1.8.1",
68-
"typescript": "^5.0.2",
75+
"typescript": "5.1.6",
6976
"vite": "^4.3.9"
7077
}
7178
}

src/api/createLesson.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export async function createLesson(props: createLessonProps) {
3333
`/api/lesson`,
3434
{
3535
lesson: {
36-
studentName: studentName,
37-
subject: subject,
38-
payment: payment,
39-
amount: amount,
40-
count: count,
41-
startDate: startDate,
42-
regularScheduleList: regularScheduleList,
36+
studentName,
37+
subject,
38+
payment,
39+
amount,
40+
count,
41+
startDate,
42+
regularScheduleList,
4343
},
4444
account: {
4545
// name: name,
46-
bank: bank,
47-
number: number,
46+
bank,
47+
number,
4848
},
4949
},
5050
{

src/api/createLessonMaintenance.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
interface createLessonMaintenanceProps {
@@ -12,8 +13,8 @@ export async function createLessonMaintenance(props: createLessonMaintenanceProp
1213
const data = await axios.post(
1314
`${import.meta.env.VITE_APP_BASE_URL}/api/lesson/maintenance`,
1415
{
15-
lessonIdx: lessonIdx,
16-
isLessonMaintenance: isLessonMaintenance,
16+
lessonIdx,
17+
isLessonMaintenance,
1718
},
1819
{
1920
headers: {

src/api/deleteLesson.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
export async function deleteLesson(lessonIdx: number) {

src/api/getAttendanceExist.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
export async function getAttendanceExist(scheduleIdx: number) {

src/api/getDepositRecord.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
export async function getDepositRecord(lessonId: number) {

src/api/getLatestScheduleByTeacher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
export async function getLatestScheduleByTeacher() {

src/api/getLessonAccount.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
23
import { getCookie } from "./cookie";
34

45
export async function getLessonAccount(lessonIdx: number) {

0 commit comments

Comments
 (0)