Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@commitlint/lint
Advanced tools
The @commitlint/lint package is a part of the commitlint toolset that is used to lint commit messages according to a specified set of rules. It helps maintain a consistent commit history and enforces a commit message convention, which is beneficial for automated processing of commit logs, generating changelogs, and aiding in code reviews.
Linting Commit Messages
This feature allows you to lint commit messages using a set of predefined rules. The code sample demonstrates how to use the lint function to check if a commit message follows the specified rules for the commit type and subject case.
const { lint } = require('@commitlint/lint');
const message = 'feat: add new feature';
const rules = {
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']],
'subject-case': [2, 'never', ['start-case', 'pascal-case', 'upper-case']]
};
lint(message, rules).then(report => {
console.log(report);
});
commitlint is the core package that includes @commitlint/lint as part of its toolset. It provides a CLI and can be extended with plugins and shareable configurations. It is essentially the same tool but with a broader scope.
conventional-changelog-lint is a predecessor to commitlint and offers similar functionality for linting commit messages based on the conventional changelog standard. It has been deprecated in favor of commitlint.
validate-commit-msg is another deprecated package that was used to validate commit messages. It has been replaced by commitlint, which offers a more modern and flexible approach to commit message validation.
Lint a string against commitlint rules
npm install --save @commitlint/lint
Consult API docs for comprehensive documentation.
Documentation generated from docs
folder.
FAQs
Lint a string against commitlint rules
The npm package @commitlint/lint receives a total of 3,278,719 weekly downloads. As such, @commitlint/lint popularity was classified as popular.
We found that @commitlint/lint 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.