Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@commitlint/load
Advanced tools
The @commitlint/load package is part of the commitlint toolchain, which is used to enforce consistent commit message formats according to various configurable rules. This package specifically handles the loading of commitlint configuration from various sources, allowing users to define rules that commit messages should adhere to in their projects.
Load Configuration
This feature allows the loading of commitlint configuration files. It supports loading from a specified path or from node_modules. The example shows how to load a common configuration that extends '@commitlint/config-conventional'.
const { load } = require('@commitlint/load');
async function loadConfig() {
const config = await load({extends: ['@commitlint/config-conventional']});
console.log(config);
}
loadConfig();
Merge Configurations
This feature demonstrates how to merge custom rules with existing configurations. The example merges a custom rule that restricts commit types to 'feat', 'fix', and 'docs' into the project's commitlint configuration.
const { load } = require('@commitlint/load');
async function mergeConfigs() {
const config = await load({
rules: {
'type-enum': [2, 'always', ['feat', 'fix', 'docs']]
}
}, {cwd: '/path/to/project'});
console.log(config);
}
mergeConfigs();
Husky is a tool for managing Git hooks. It can be used alongside commitlint by triggering linting on commits. While husky itself does not provide commit message linting, it is commonly used to run commitlint checks before commits are allowed. This makes it a complementary tool rather than a direct alternative.
Load shared commitlint configuration
npm install --save-dev @commitlint/load
const load = require('@commitlint/load').default;
load({extends: ['./package']}).then((config) => console.log(config));
// => { extends: ['./package', './package-b'], rules: {} }
Consult docs/api for comprehensive documentation.
13.0.0 (2021-05-24)
add subject-exclamation-mark rule to improve error messages (#2593) (be701bd)
chore!: remove node 10 support (#2596) (4db4ba1), closes #2596
FAQs
Load shared commitlint configuration
The npm package @commitlint/load receives a total of 2,928,126 weekly downloads. As such, @commitlint/load popularity was classified as popular.
We found that @commitlint/load 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.