Socket
Book a DemoInstallSign in
Socket

commitlint-config-squash-pr

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitlint-config-squash-pr

Sharable commitlint config enforcing a max commit message header length when squashing GitHub PRs

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

commitlint-config-squash-pr

Sharable commitlint config for enforcing a maximum commit message header length, taking into account the larger size of squashed PR commit messages generated when using the "Squash and merge" button in GitHub PRs.

When using the "Squash and merge" button on a GitHub PR, the PR ID (e.g. 234) will be appended to the end of the resulting squashed commit message in the form (#234). This makes the final commit message header longer than the commit message header that commitlint validated in the PR, potentially resulting in the final commit failing to pass CI.

This module takes this into account when validating the commit message before the PR is merged.

npm build status js-standard-style

Installation

npm install commitlint-config-squash-pr --save-dev

Usage example

In this example we're extending the popular @commitlint/config-conventional ruleset by using a local commitlint.config.js file:

// commitlint.config.js
module.exports = {
  extends: [
    'squash-pr', // the commitlint-config- prefix is implied
    '@commitlint/config-conventional'
  ]
}

Read more about Sharable configuration.

Supported CI systems

  • Travis CI
  • Jenkins (Multibranch Pipelines)

License

MIT

Keywords

commitlint

FAQs

Package last updated on 10 Jun 2020

Did you know?

Socket

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