All Projects → vidavidorra → commitlint-plugin-function-rules

vidavidorra / commitlint-plugin-function-rules

Licence: GPL-3.0 license
Commitlint plugin to define rules as functions.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to commitlint-plugin-function-rules

gitmoji-commit-workflow
😉 Gitmoji Commit Workflow
Stars: ✭ 120 (+471.43%)
Mutual labels:  commitlint, commitlintplugin
commitiquette
Plugin for Commitizen that uses commitLint configuration
Stars: ✭ 24 (+14.29%)
Mutual labels:  commitlint, commitlintplugin
proxifier-rules
Rules for proxifiers programs: Proxifier
Stars: ✭ 51 (+142.86%)
Mutual labels:  rules
A41SLBOT
All For One Bot is an open-source discord server bot built for All For One SL™ discord server.
Stars: ✭ 83 (+295.24%)
Mutual labels:  rules
ClashX-Pro
Clash X for Mac 自用稳定分流规则、参考配置
Stars: ✭ 738 (+3414.29%)
Mutual labels:  rules
cs-expert-system-shell
C# implementation of an expert system shell
Stars: ✭ 34 (+61.9%)
Mutual labels:  rules
Rulette
A pragmatic business rule management system
Stars: ✭ 91 (+333.33%)
Mutual labels:  rules
readme
A README for the organisation and its repositories.
Stars: ✭ 29 (+38.1%)
Mutual labels:  rules
laravel-password-history-validation
Prevent users from reusing recently used passwords
Stars: ✭ 69 (+228.57%)
Mutual labels:  rules
inside-client
Human Resources Department Tool. https://ifactory-solutions.github.io/inside-client/
Stars: ✭ 42 (+100%)
Mutual labels:  commitlint
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+1728.57%)
Mutual labels:  commitlint
Ravys-unified-discord-ruleset
Extensive, yet polished community ruleset, aimed at reducing the work of moderators
Stars: ✭ 21 (+0%)
Mutual labels:  rules
commitlint
开箱即用的代码提交规范
Stars: ✭ 51 (+142.86%)
Mutual labels:  commitlint
cdkdx
Zero-config CLI for aws cdk development
Stars: ✭ 31 (+47.62%)
Mutual labels:  rules
glint
glint is a friendly tool for creating commits in the Conventional Commit style
Stars: ✭ 80 (+280.95%)
Mutual labels:  commitlint
mdmlang
🔄 Natural Transformation Language for Java
Stars: ✭ 14 (-33.33%)
Mutual labels:  rules
fe-standard-config-seed
前端通用代码规范自动化接入
Stars: ✭ 18 (-14.29%)
Mutual labels:  commitlint
RulerZBundle
Symfony Bundle for RulerZ
Stars: ✭ 38 (+80.95%)
Mutual labels:  rules
eslint-rules
My custom eslint rules in addition to the ones provided at http://eslint.org/
Stars: ✭ 94 (+347.62%)
Mutual labels:  rules
commitlint-config-cz
⚙️ commitlint sharable configuration, automatically converts/merges your cz-customizable (commitizen) config.
Stars: ✭ 23 (+9.52%)
Mutual labels:  commitlint

commitlint plugin function rules

commitlint plugin to use functions as rule value.

  • Create custom function, sync or async, as rule value.
  • Create rules that are based on the commit message.
  • Write rules with regular expressions.
  • Use the same rules that are available in commitlint.

npm version npm downloads Node.js version support Renovate enabled semantic-release Code coverage License

Table of contents

Install

npm install --save-dev commitlint-plugin-function-rules @commitlint/cli

Usage

Use this plugin in your project's commitlint configuration by specifying it as item in the plugins array. All rules have same name as the commitlint rules, but with the function-rules prefix.

Note: The available rules are the same as in commitlint, so it is recommended to disable the commitlint rule when specifying a function rule to avoid undefined behaviour.

module.exports = {
  extends: ['@commitlint/config-conventional'],
  plugins: ['commitlint-plugin-function-rules'],
  rules: {
    'header-max-length': [0], // level: disabled
    'function-rules/header-max-length': [
      2, // level: error
      'always',
      (parsed) => {
        if (parsed.type === 'chore' && parsed.header.length < 20) {
          return [true];
        }
        return [false, 'chore header must not be longer than 120 characters'];
      },
    ],
  },
};

Documentation

Contributing

Please create an issue if you have a bug report, feature proposal or question that does not yet exist.

Please give this project a star if you like it and consider becoming a sponsor to support this project.

Refer to the contributing guide detailed information about other contributions, like pull requests.

Conventional Commits: 1.0.0 Code style Linting Lint commit messages Build

Security policy

Please refer to the Security Policy on GitHub for the security policy.

License

This project is licensed under the GPLv3 license.

Copyright © 2020-2021 Jeroen de Bruijn

License details.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

The full text of the license is available in the LICENSE file in this repository and online.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].