0.0.34 • Published 1 year ago

@parcellab/danger-plugin v0.0.34

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@parcellab/danger-plugin

Publish Test

Set of Danger rules used to check PRs in JavaScript/TypeScript codebases.

This plugin allows configuration for the following events:

  • Conventional commits format
  • Commit scopes (useful for monorepos)
  • PR title length
  • PR title scope (useful for monorepos)
  • PR relation to JIRA issue
  • Maximum number of commits in the PR
  • Maximum number of lines in the PR
  • Maximum number of changed files in the PR

Usage

Install:

yarn add @parcellab/danger-plugin --dev
# or
npm i @parcellab/danger-plugin --save-dev

At a glance:

// dangerfile.js
import parcellab from "@parcellab/danger-plugin";

(async function dangerReport() {
  await parcellab({
    conventional: {
      severity: "warn",
    },
  });
})();

To override some default parameters:

// dangerfile.js
import configLernaScopes from "@commitlint/config-lerna-scopes";
import parcellab from "@parcellab/danger-plugin";

(async function dangerReport() {
  await parcellab({
    branchSize: {
      maxCommits: 20,
      maxFiles: 200,
      severity: "fail",
    },
    conventional: {
      rules: configLernaScopes.rules,
      severity: "warn",
    },
    prLint: {
      severity: "message",
    },
    jira: {
      severity: "disabled",
    },
  });
})();

Parameters

ConfigNameDefaultDescription
branchSizemaxCommits10maximum number of commits
branchSizemaxLines2000maximum number of line additions and deletions
branchSizemaxFiles100maximum number of changed files
branchSizeseveritywarndanger event type
conventionalrules@commitlint/config-conventional rulesconventional commit rules to lint
conventionalseverityfaildanger event type
jiraseveritywarndanger event type
prLintminBodyLength10minimum number of characters in the PR body
prLintseverityfaildanger event type

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

0.0.25

1 year ago

0.0.30

1 year ago

0.0.31

1 year ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.34

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.14

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago