This repository contains a basic template of a create-next-app that comes with the following packages out of the box:
It also has custom styling that has a base color scheme and a font scheme as well.
First, install the dependencies:
npm install
# or
yarn install
Then, run the development server:
npm run dev
# or
yarn dev
- Create a commitlint file:
touch commitlint.config.js
- Configure the commitlint file:
module.exports = {
extends: ['@commitlint/config-conventional'],
};
- Add a prepare step which enables husky to run the commitlint:
npm pkg set scripts.prepare "husky install"
- Run the prepare step:
npm run prepare
- Add a pre-commit step which runs the commitlint:
npx husky add .husky/pre-commit "npx --no-install commitlint --edit $1"
or
yarn husky add .husky/commit-msg "yarn commitlint --edit $1"