
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
lint-prepush
Advanced tools
Run linters on committed files of a GIT Branch🔬
This package will run linters on your project for the committed files in your branch.
It require Node.js v6 or newer. It also requires a package to manage git hooks. I strongly suggest Husky which I use for most of my projects.
// package.json
{
"husky": {
"hooks": {
"pre-commit": "npm test",
"pre-push": "npm test",
"...": "..."
}
}
}
npm install --save-dev husky lint-prepush
or using yarn
:
yarn add --dev husky lint-prepush
Configure the following scripts in package.json to lint your committed files 🔧. You can also follow any of the cosmiconfig methods to configure lint-prepush.
{
"scripts": {
+ "prepush": "lint-prepush"
},
+ "lint-prepush": {
+ "base": "master",
+ "tasks": {
+ "*.js": [
+ "eslint"
+ ]
+ }
+ }
}
The above scrips will lint the js files while pushing to git. It will terminate the process if there are any errors, otherwise, the changes will be pushed.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
MIT @ Theena Dayalan
FAQs
Run linters on committed files in a Branch🔬
The npm package lint-prepush receives a total of 7,714 weekly downloads. As such, lint-prepush popularity was classified as popular.
We found that lint-prepush demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.