
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
simple-pre-commit
Advanced tools
A simple, zero dependency tool for setting up git pre-commit hook for small projects
A tool, that let you set any command from package.json
as a pre-commit hook.
package.json
)Install the simple-pre-commit as dev dependency
npm install simple-pre-commit --save-dev
Add the simple-pre-commit
to your package.json
. Feed it with any command you would like to run as a pre-commit
hook.
"simple-pre-commit": "npx lint-staged"`
There are more ways to configure the package. Check out [additional configuration](#Additional configuration options)
Run the CLI script to update the git hook with command from package.json
npx simple-pre-commit
Now the command from package.json
is set up as executable git pre-commit
hook.
Run npx simple-pre-commit
from root of your project
Note that you should manually run npx simple-pre-commit
every time you change the command
You can also add the .simple-pre-commit.json
or simple-pre-commit.json
to the project and write the command inside it, if you do not want to put command inside package.json
That way, .simple-pre-commit.json
or simple-pre-commit.json
should look like this and package.json
may not have simple-pre-commit
configuration inside it
{
"simple-pre-commit":"npx lint staged"
}
npm uninstall --save-dev simple-pre-commit
FAQs
A simple, zero dependency tool for setting up git pre-commit hook for small projects
The npm package simple-pre-commit receives a total of 699 weekly downloads. As such, simple-pre-commit popularity was classified as not popular.
We found that simple-pre-commit demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.