Skip to content

Commit

Permalink
Merge pull request #475 from Gwasuwon-shot/fix#449-eslintEdit
Browse files Browse the repository at this point in the history
Fix#449 eslint edit
  • Loading branch information
eunbeann authored Jun 28, 2024
2 parents 0e4d6c6 + 553e064 commit 78da40d
Show file tree
Hide file tree
Showing 114 changed files with 1,368 additions and 577 deletions.
17 changes: 14 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
settings: {
react: {
version: "detect",
},
},
plugins: ["@typescript-eslint", "prettier", "react", "simple-import-sort"],
extends: [
"airbnb",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:react/recommended",
"prettier",
],
rules: {
"linebreak-style": 0,
Expand All @@ -22,6 +32,7 @@ module.exports = {
"eol-last": ["error", "always"], // line의 가장 마지막 줄에는 개행 넣기
"react/react-in-jsx-scope": "off",
"no-multi-spaces": "error", // 스페이스 여러개 금지
"simple-import-sort/imports": "error"
"simple-import-sort/imports": "error",
"no-use-before-define": ["error", false],
},
};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.19.0
v18.20.3
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint",
"stylelint": "stylelint './src/**/*.tsx' --fix",
"preview": "vite preview"
},
Expand Down Expand Up @@ -59,13 +59,20 @@
"@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.44.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-config-airbnb": "^19.0.4",
"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.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.3.4",
"eslint-plugin-simple-import-sort": "^12.1.0",
"postcss": "^8.4.25",
"postcss-styled-syntax": "^0.4.0",
"prettier": "^3.0.0",
"slick-carousel": "^1.8.1",
"typescript": "^5.0.2",
"typescript": "5.1.6",
"vite": "^4.3.9"
}
}
18 changes: 9 additions & 9 deletions src/api/createLesson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ export async function createLesson(props: createLessonProps) {
`/api/lesson`,
{
lesson: {
studentName: studentName,
subject: subject,
payment: payment,
amount: amount,
count: count,
startDate: startDate,
regularScheduleList: regularScheduleList,
studentName,
subject,
payment,
amount,
count,
startDate,
regularScheduleList,
},
account: {
// name: name,
bank: bank,
number: number,
bank,
number,
},
},
{
Expand Down
5 changes: 3 additions & 2 deletions src/api/createLessonMaintenance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

interface createLessonMaintenanceProps {
Expand All @@ -12,8 +13,8 @@ export async function createLessonMaintenance(props: createLessonMaintenanceProp
const data = await axios.post(
`${import.meta.env.VITE_APP_BASE_URL}/api/lesson/maintenance`,
{
lessonIdx: lessonIdx,
isLessonMaintenance: isLessonMaintenance,
lessonIdx,
isLessonMaintenance,
},
{
headers: {
Expand Down
1 change: 1 addition & 0 deletions src/api/deleteLesson.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function deleteLesson(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getAttendanceExist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getAttendanceExist(scheduleIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getDepositRecord.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getDepositRecord(lessonId: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLatestScheduleByTeacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLatestScheduleByTeacher() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonAccount.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonAccount(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonByParents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonByParents() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonByTeacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonByTeacher() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonByUser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonByUser() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonDetail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonDetail(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonPaymentRecordByTeacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonPaymentRecordByTeacher(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonProgress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonProgress(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonRegularSchedule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonRegularSchedule(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonSchedule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonSchedule(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonScheduleByParents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonScheduleByParents(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getLessonScheduleByTeacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getLessonScheduleByTeacher(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getMissingAttendanceByLessonExist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getMissingAttendanceByLessonExist(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getMissingAttendanceExist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getMissingAttendanceExist() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getMissingAttendanceSchedule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getMissingAttendanceSchedule() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getMissingMaintenanceExist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getMissingMaintenanceExist() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getMissingMaintenanceLesson.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getMissingMaintenanceLesson() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getPastLessonRecord.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getPastLessonRecord(lessonId: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getPaymentRecordByLesson.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getPaymentRecordByLesson(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getPaymentRecordCycle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getPaymentRecordCycle(paymentRecordIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getPaymentRecordView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getPaymentRecordView(paymentRecordIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/getScheduleByUser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getScheduleByUser(date: string) {
Expand Down
11 changes: 6 additions & 5 deletions src/api/getTemporarySchedule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

interface Day {
Expand All @@ -21,11 +22,11 @@ export async function getTemporarySchedule(props: temporaryProp) {
const data = await axios.post(
`${import.meta.env.VITE_APP_BASE_URL}/api/schedule/temporary`,
{
studentName: studentName,
subject: subject,
count: count,
startDate: startDate,
regularScheduleList: regularScheduleList,
studentName,
subject,
count,
startDate,
regularScheduleList,
},
{
headers: {
Expand Down
1 change: 1 addition & 0 deletions src/api/getTodayDate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getTodayDate() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getTodayScheduleByParents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getTodayScheduleByParents() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getTodayScheduleByTeacher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getTodayScheduleByTeacher() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getTodayScheduleExist.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getTodayScheduleExist() {
Expand Down
1 change: 1 addition & 0 deletions src/api/getUserName.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function getUserName() {
Expand Down
1 change: 1 addition & 0 deletions src/api/localLogin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { userLoginTypes } from "../type/login/userLoginType";

export async function postLocalLogin(userLogin: userLoginTypes) {
Expand Down
1 change: 1 addition & 0 deletions src/api/localSignUp.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { NewUserDataTypes } from "../type/SignUp/newUserDataType";

export async function newUserPost(newUser: NewUserDataTypes) {
Expand Down
3 changes: 2 additions & 1 deletion src/api/patchLessonParents.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function patchLessonParents(lessonCode: string) {
const data = await axios.patch(
`${import.meta.env.VITE_APP_BASE_URL}/api/lesson/parents`,
{
lessonCode: lessonCode,
lessonCode,
},
{
headers: {
Expand Down
1 change: 1 addition & 0 deletions src/api/patchLogout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function patchLogout() {
Expand Down
2 changes: 1 addition & 1 deletion src/api/postCheckEmail.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";

export async function postCheckEmail(email: string) {
const data = await axios.post(`${import.meta.env.VITE_APP_BASE_URL}/api/auth/email/duplication`, { email: email });
const data = await axios.post(`${import.meta.env.VITE_APP_BASE_URL}/api/auth/email/duplication`, { email });
return data;
}
1 change: 1 addition & 0 deletions src/api/requestAttendanceNotification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function requestAttendanceNotification(scheduleIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/requestPaymentRecordNotification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { getCookie } from "./cookie";

export async function requestPaymentRecordNotification(lessonIdx: number) {
Expand Down
1 change: 1 addition & 0 deletions src/api/updatePaymentRecord.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axios from "axios";

import { RegisterPaymentTpye } from "../type/manageLesson/registerPaymentType";
import { getCookie } from "./cookie";

Expand Down
Loading

0 comments on commit 78da40d

Please sign in to comment.