Socket
Socket
Sign inDemoInstall

@commitlint/types

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/types

Shared types for commitlint packages


Version published
Maintainers
4
Created

What is @commitlint/types?

@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.

What are @commitlint/types's main functionalities?

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']
};

Other packages similar to @commitlint/types

FAQs

Package last updated on 28 Feb 2024

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