@classcraft.edu/commitlint-config

0.0.0 • Public • Published

@classcraft.edu/commitlint-config

npm version License

Shareable commitlint config.

Install

You can install it with npm or Yarn.

# pnpm
pnpm i -D @classcraft.edu/commitlint-config @commitlint/cli

# npm
npm i -D @classcraft.edu/commitlint-config @commitlint/cli

# Yarn
yarn add -D @classcraft.edu/commitlint-config @commitlint/cli

Usage

After installing it, apply the config to commitlint by running the following command:

echo "module.exports = { extends: ['@classcraft.edu/commitlint-config'] };" > .commitlintrc.js

Bonus

To lint commits before they are created, install Husky and use the 'commit-msg' hook.

# npm
pnpm i -D husky

# npm
npm i -D husky

# yarn
yarn add -D husky

After that, you can create a .huskyrc file or add to your package.json the following code for

Husky v4:

{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

Husky v5:

# .husky/commit-msg
# pnpm
pnpx commitlint --edit $1
# npm
npx --no-install commitlint --edit $1
# yarn
yarn commitlint --edit $1

License

MIT License

Package Sidebar

Install

npm i @classcraft.edu/commitlint-config

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

3.7 kB

Total Files

4

Last publish

Collaborators

  • jeffersonwilliammachado
  • classcraftedu