This is a Next.js project bootstrapped with pnpm dlx create-next-app@latest --use-pnpm.
Clone the repository and run pnpm install to install the dependencies.
Run pnpm dev to start the development server.
Install and config each package and create the necessary files for his configuration.
See the commitlint guide and local setup
pnpm add --save-dev @commitlint/{cli,config-conventional}Create the commitlint configuration file
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.tspnpm add --save-dev husky
pnpm husky init
echo "pnpm dlx commitlint --edit \$1" > .husky/commit-msgSee the commitizen cz-cli guide
pnpm add -D commitizen
pnpm dlx commitizen init cz-conventional-changelog --pnpm --save-dev --save-exactCreate prepare-commit-msg hook to run commitizen
echo "exec < /dev/tty && node_modules/.bin/cz --hook || true" > .husky/prepare-commit-msgpnpm add -D prettier eslint-config-prettier eslint-config-prettier eslint-plugin-prettierCreate the prettier configuration file
echo "export default {plugins: ['prettier-plugin-organize-imports','prettier-plugin-tailwindcss'],
tailwindFunctions: ['clsx'],};" > prettier.config.mjspnpm add -D lint-stagedAnd in the pre commit husky hook copy the following:
npx lint-stagedAnd the package.json copy the following:
"devDependencies": {
....
},
"lint-staged": {
"*.{js,ts}": [
"eslint --fix",
"prettier --write"
],
"*.{md,html,json}": "prettier --write"
},