diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 172ad0d..37b02bb 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,5 +7,7 @@ module.exports = { plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], + 'no-var': 'error', + 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], }, }; diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index fd87b27..ecb0e63 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -1,16 +1,17 @@ --- name: issue template about: 미니 프로젝트 이슈 템플릿 -title: "[ 페이지명 ] 이슈 내용" +title: '[ 페이지명 ] 이슈 내용' labels: '' assignees: '' - --- ## Todo + - [ ] Todo1 - [ ] Todo2 - [ ] Todo3 ## 참고자료 + - 있으면 추가하고 없을 시 삭제 하세요. diff --git a/.gitignore b/.gitignore index 438657a..a4b3987 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ dist dist-ssr *.local .env +.eslintcache # Editor directories and files .vscode/* diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..57fd229 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run lint +npm run format diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..75fac8e --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run lint diff --git a/index.html b/index.html index 05bfe53..a564273 100644 --- a/index.html +++ b/index.html @@ -1,24 +1,26 @@ + + + + + + + + + + + + Dr. Cal + - - - - - - - - - - - - Dr. Cal - - - -
- - - - \ No newline at end of file + +
+ + + diff --git a/package-lock.json b/package-lock.json index d0fc87f..19e3b7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "eslint": "^8.45.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "husky": "^8.0.3", "prettier": "^3.0.0", "typescript": "^5.0.2", "vite": "^4.4.5" @@ -3861,6 +3862,21 @@ "node": ">=4" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -7740,6 +7756,12 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" }, + "husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true + }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", diff --git a/package.json b/package.json index 22b695f..47ce03a 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,10 @@ "scripts": { "dev": "vite", "build": "npm install & tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "lint": "eslint --cache .", + "preview": "vite preview", + "postinstall": "husky install", + "format": "prettier --cache --write ." }, "dependencies": { "@ag-grid-community/core": "^30.2.1", @@ -37,6 +39,7 @@ "eslint": "^8.45.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "husky": "^8.0.3", "prettier": "^3.0.0", "typescript": "^5.0.2", "vite": "^4.4.5"