commitlint_cli 0.3.0-dev.0 copy "commitlint_cli: ^0.3.0-dev.0" to clipboard
commitlint_cli: ^0.3.0-dev.0 copied to clipboard

Commitlint lint commit messages to satisfy conventional commit format

commitlint #

Pub Version popularity likes CI

Dart version commitlint - A tool to lint commit messages. (Inspired by JavaScript commitlint) Dart version commitlint cli (known in JavaScript comunity)

commitlint lint commit messages to satisfy conventional commit format

commitlint helps your team adhere to a commit convention. By supporting pub-installed configurations it makes sharing of commit conventions easy.

Getting started #

Install #

Add commitlint_cli to your dev_dependencies in pubspec.yaml

# Install commitlint_cli
dart pub add --dev commitlint_cli

Configuration #

# Configure commitlint to use conventional config
echo "include: package:commitlint_cli/commitlint.yaml" > commitlint.yaml

Test #

# Lint from stdin
echo 'foo: bar' | dart run commitlint_cli
⧗  input: type: add docs
✖  type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] type-enum

✖  found 1 errors, 0 warnings
# Lint last commit from history
commitlint --from=HEAD~1

Setup git hook #

With husky (a tool for managing git hooks), commitlint cli can be used as commmit-msg git hook

and husky

Set commit-msg hook: #

dart pub add --dev husky
dart run husky install
dart run husky set .husky/commit-msg 'dart run commitlint_cli --edit "$1"'

Make a commit: #

git add .
git commit -m "Keep calm and commit"
# `dart run commitlint_cli --edit "$1"` will run

To get the most out of commitlint you'll want to automate it in your project lifecycle. See our Setup guide for next steps.

Documentation #

See documention

  • Guides - Common use cases explained in a step-by-step pace
  • Concepts - Overarching topics important to understand the use of commitlint
  • Reference - Mostly technical documentation
2
likes
0
pub points
80%
popularity

Publisher

unverified uploader

Commitlint lint commit messages to satisfy conventional commit format

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

args, change_case, collection, colorize, meta, path, yaml

More

Packages that depend on commitlint_cli