Socket
Socket
Sign inDemoInstall

@mediamonks/commitlint-config

Package Overview
Dependencies
0
Maintainers
10
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mediamonks/commitlint-config

Sharable commitlint config based on Media.Monks Frontend Coding Standards


Version published
Weekly downloads
198
increased by78.38%
Maintainers
10
Install size
2.99 kB
Created
Weekly downloads
 

Readme

Source

@mediamonks/commitlint-config

Set some basic conventions and rules for our commit messages using commitlint.

Note that we have not enabled the type and scope rules that are "conventional", because we don't use them. It just focuses on the basics outlined in this article on how to write good commit messages.

Installation

Install @commitlint/cli and @mediamonks/commitlint-config

npm i -D @commitlint/cli @mediamonks/commitlint-config

Create your configuration

This can be added in a lot of places (see docs), but we recommend the package.json.

{
  ...
  "commitlint": {
    "extends": ["@mediamonks/commitlint-config"]
  }
}

Set up husky

To make sure that your commit messages are validated when you are committing.

# Install Husky v6
npm i -D husky

# Activate hooks
npx husky install

# Add hook
npx husky add .husky/commit-msg  'npx --no -- commitlint --edit ${1}'

Rules

Errors

  • Subject line must be 72 characters max
  • Subject line must start with a capital letter
  • Subject line must not end with a period
  • There must be an empty line between the subject and the body
  • Body must be 72 characters max per line

Warnings

  • Subject line must be 30 characters min

Keywords

FAQs

Last updated on 21 Jul 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc