Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
commitlint-plugin-function-rules
Advanced tools
commitlint plugin to use functions as rule value
commitlint plugin to use functions as rule value.
sync
or async
, as rule value.npm install --save-dev commitlint-plugin-function-rules @commitlint/cli @commitlint/config-conventional
Use this plugin in your project's commitlint configuration by specifying it as item in the plugins
array. All rules have same name as rules that are available in commitlint, but with the function-rules
prefix. The example commitlint.config.js
, or commitlint.config.cjs
if the package is an ES module, shows the usage of a function rule.
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) => {
// Allow longer headers for commits with "deps" scope.
if (parsed.scope === 'deps' && parsed.header.length <= 200) {
return [true];
}
return [false, 'deps header must not be longer than 200 characters'];
},
],
},
};
Please create an issue if you have a bug report or feature proposal, or create a discussion if you have a question. If you like this project, please consider giving it a star ⭐
Refer to the contributing guide for detailed information about other contributions, like pull requests.
Please refer to the Security Policy on GitHub for the security policy.
This project is licensed under the GPLv3 license.
Copyright © 2020-2024 Jeroen de Bruijn
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.
FAQs
commitlint plugin to use functions as rule value
The npm package commitlint-plugin-function-rules receives a total of 29,238 weekly downloads. As such, commitlint-plugin-function-rules popularity was classified as popular.
We found that commitlint-plugin-function-rules demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.