Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vingle/commitlint-preset

Package Overview
Dependencies
Maintainers
9
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vingle/commitlint-preset

commitlint rules for Vingle, Inc.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
543
decreased by-3.72%
Maintainers
9
Weekly downloads
 
Created
Source

Vingle commitlint preset

A common commitlint preset for TypeScript projects at Vingle.

IMPORTANT NOTE

This preset requires global npm dependency. Make sure commitizen is installed globally:

$ npm install commitizen -g

Local Setup

If you want to lint commit message via Git Hook to enforce commit message style in local dev environment, Follow these instructions.

In this setup, You'll need to install additional husky dependency.

$ npm install @vingle/commitlint-preset husky --save-dev

Add the following to package.json

{
  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog"
    }
  },
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  },
  "commitlint": {
    "extends": [
      "@vingle/commitlint-preset"
    ]
  }
}

Done. There is no any additional steps to check commit message. commitlint will be automatically executed every commits.

CI Setup

If you want to lint commit message via CI environment, Follow these instructions.

In this setup, husky is not required.

Add the following to package.json

{
  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog"
    }
  },
  "commitlint": {
    "extends": [
      "@vingle/commitlint-preset"
    ]
  }
}

Done. Please follow below steps to execute commitlint.

Github Actions

Add following to workflow.yml

  steps:
    - name: CommitLint
      run: npx commitlint --from ${{ github.event.before || github.event.head || 'master' }} --verbose
Travis CI

Install additional dependency:

$ npm install @commitlint/travis-cli --save-dev

Add following to travis.yml

# travis.yml
language: node_js
script:
  - commitlint-travis
Other CI Environments

Execute following to check commit message:

$ npx run commitlint --from [COMMIT_SHA1] --to [COMMIT_SHA1]

Commit Helpers

cz-cli

cz-cli provides git extension to create semantic commits.

Simply use git cz instead of using git commit.

Keywords

FAQs

Package last updated on 04 May 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc