diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..6cdaab7 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint diff --git a/.pnp.cjs b/.pnp.cjs index d0f8d16..4bdc6b6 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -54,6 +54,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint", "npm:8.23.0"],\ ["eslint-config-next", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:12.2.5"],\ ["front-matter", "npm:4.0.2"],\ + ["husky", "npm:8.0.1"],\ ["js-yaml", "npm:4.1.0"],\ ["next", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:12.2.5"],\ ["next-mdx-remote", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:4.1.0"],\ @@ -5774,6 +5775,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint", "npm:8.23.0"],\ ["eslint-config-next", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:12.2.5"],\ ["front-matter", "npm:4.0.2"],\ + ["husky", "npm:8.0.1"],\ ["js-yaml", "npm:4.1.0"],\ ["next", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:12.2.5"],\ ["next-mdx-remote", "virtual:f08287697b7d2fc46a42096e551a2e11a899df532e6925b4b20b7308fc0998fe39de46d9a4afbfc1eb7c4f6a22b5e65efb2ab217c04a67bf2731436b2b2df986#npm:4.1.0"],\ @@ -6131,6 +6133,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["husky", [\ + ["npm:8.0.1", {\ + "packageLocation": "./.yarn/cache/husky-npm-8.0.1-85fede8470-943a73a13d.zip/node_modules/husky/",\ + "packageDependencies": [\ + ["husky", "npm:8.0.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["iconv-lite", [\ ["npm:0.6.3", {\ "packageLocation": "./.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip/node_modules/iconv-lite/",\ diff --git a/.yarn/cache/husky-npm-8.0.1-85fede8470-943a73a13d.zip b/.yarn/cache/husky-npm-8.0.1-85fede8470-943a73a13d.zip new file mode 100644 index 0000000..50b2625 Binary files /dev/null and b/.yarn/cache/husky-npm-8.0.1-85fede8470-943a73a13d.zip differ diff --git a/README.md b/README.md index c87e042..736be4c 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,3 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +## Contributing -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. - -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +run `yarn prepare` before you do anything diff --git a/package.json b/package.json index ad746b4..c8968dc 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "prepare": "husky install" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.2.0", @@ -45,6 +46,7 @@ "autoprefixer": "^10.4.8", "eslint": "8.23.0", "eslint-config-next": "12.2.5", + "husky": "^8.0.1", "postcss": "^8.4.16", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.1.13", diff --git a/yarn.lock b/yarn.lock index d981dd2..378c975 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3955,6 +3955,7 @@ __metadata: eslint: 8.23.0 eslint-config-next: 12.2.5 front-matter: ^4.0.2 + husky: ^8.0.1 js-yaml: ^4.1.0 next: 12.2.5 next-mdx-remote: ^4.1.0 @@ -4275,6 +4276,15 @@ __metadata: languageName: node linkType: hard +"husky@npm:^8.0.1": + version: 8.0.1 + resolution: "husky@npm:8.0.1" + bin: + husky: lib/bin.js + checksum: 943a73a13d0201318fd30e83d299bb81d866bd245b69e6277804c3b462638dc1921694cb94c2b8c920a4a187060f7d6058d3365152865406352e934c5fff70dc + languageName: node + linkType: hard + "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3"