New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@guidecx/config-branchlint

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guidecx/config-branchlint

Branch linting script for use in GCX applications

  • 0.0.1-alpha.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

GCX Branchlint Script

Installing script into another project

The index.js file exports the branchlint node script. In another project, you can do the following to include these linting rules:

  1. at the root of the other project, install the package with npm install --save-dependency @guidecx/config-branchlint
  2. if you haven't installed husky and lint-staged, install them. according to the lint-staged docs, the easiest way to do this is by running npx mrm lint-staged.
  3. in your package.json file, include the following to your husky commands:
    "husky": {
      "hooks": {
        "pre-commit": "node ./node_modules/@guidecx/config-branchlint"
      }
    }
    
    • Alternatively, if the current app has a .husky/ folder that manages your scripts, add npm run branchlint into the bash file for pre-commit, and then create an npm script in your package.json like:
        "scripts": {
          "branchlint": "node ./node_modules/@guidecx/config-branchlint"
        }
      
  4. if everything was done correctly, making a git commit will now enforce our branch linting rules

Example branchlint patterns

When using this package, all branch names must match the following pattern:

currentUser/type/chStory/simple-description

where 'type' is an enum [chore, feat, fix, revert], chStory is a positive integer that matches a clubhouse story number prefaced with ch, and simple-description is a brief description of the changes made.

Based on the rules file, these are some of the patterns that are considered valid:

agarvin/feat/ch1823/add-unit-tests-to-view
iclaw/chore/ch891/disable-time-entry-page
jgomez/revert/ch2761/revert-disable-time-entry-page

FAQs

Package last updated on 24 Sep 2021

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