Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@commitlint/types
Advanced tools
@commitlint/types is a TypeScript type definitions package for Commitlint, a tool used to enforce conventional commit messages. It provides type definitions for various Commitlint configurations, rules, and utilities, ensuring type safety and better development experience when working with Commitlint.
Commitlint Configuration Types
Defines the configuration for Commitlint using the provided type definitions. This ensures that the configuration adheres to the expected structure and types.
const config: import('@commitlint/types').UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']]
}
};
Commitlint Rule Types
Defines a custom rule for Commitlint using the provided type definitions. This ensures that the rule function adheres to the expected signature and types.
const rule: import('@commitlint/types').Rule = (parsed, when, value) => {
return [true, 'Commit message is valid'];
};
Commitlint Parser Options Types
Defines parser options for Commitlint using the provided type definitions. This ensures that the parser options adhere to the expected structure and types.
const parserOpts: import('@commitlint/types').ParserOptions = {
headerPattern: /^([A-Z]+-[0-9]+): (.*)$/,
headerCorrespondence: ['type', 'subject']
};
Conventional Changelog is a suite of tools to parse conventional commit messages and generate changelogs. It provides similar functionalities to Commitlint but focuses more on generating changelogs rather than enforcing commit message conventions.
Commitizen is a tool that helps developers write standardized commit messages. It provides a command-line interface to guide users through the commit message creation process, ensuring adherence to conventional commit standards. Unlike Commitlint, it focuses on the commit message creation process rather than validation.
Semantic Release automates the versioning and package publishing process based on commit messages. It uses conventional commit messages to determine the type of release (major, minor, patch) and generates release notes. While it shares the goal of standardizing commit messages, it extends beyond validation to automate the release process.
FAQs
Shared types for commitlint packages
We found that @commitlint/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.