A pluggable linter for ECMAScript/JavaScript that finds problematic patterns in code and can automatically fix many of them.
sds/overcommit
A configurable Git hook manager written in Ruby that runs linters, tests and custom scripts on commit, push and other Git events.
- Stars
- 4,005
- Forks
- 291
- Open issues
- 34
- Last commit
- yesterday
What is it?
Overcommit manages Git hooks for a repository so that checks such as linters, test runners and formatters run automatically at points like pre-commit, commit-msg, pre-push and post-checkout. Hook behavior is set in a per-repository .overcommit.yml file, which can enable or disable individual hooks, control which files they apply to, and tune options such as parallel execution and failure handling.
The project ships with a large set of built-in hooks covering languages and tools including Ruby (RuboCop, RSpec), JavaScript (ESLint, Stylelint), Python (Pylint, Flake8), Go, PHP, Java and Shell, plus generic checks for trailing whitespace, merge conflict markers and file sizes. Teams can also write repo-specific hooks in Ruby, or register an existing shell script as a hook without writing Ruby code.
Configuration can be shared through source control, while a .local-overcommit.yml file allows personal overrides. Overcommit also records a signature of hook code and configuration so that changes made by others are flagged before the hooks run again.
Key features
- 01Runs hooks on many Git events, including pre-commit, commit-msg, pre-push and post-checkout.
- 02Ships with a large set of built-in linters and test runners for common languages.
- 03Lets you add existing shell scripts as hooks without writing Ruby.
- 04Supports per-hook file filters, branch exclusions and parallel execution.
- 05Provides a --run mode to check an entire repository in CI.
Use cases
- Running RuboCop or ESLint automatically before each commit in a team repository.
- Blocking pushes to protected branches or commits with merge conflict markers.
- Running the same lint suite in CI as developers run locally before committing.
Quick start
- 1
Install the overcommit gem via RubyGems
gem install overcommit - 2
Go to your repository and initialize Git if needed
git init - 3
Install the Overcommit hooks into the repository
overcommit --install
Things to know
- Some hooks depend on third-party tools (for example scss_lint), which you must install yourself.
- Requires a Ruby environment, with Ruby 2.6+ on *nix and only best-effort support on Windows.
In collections
Topics
FAQ
- What is overcommit?
- A configurable Git hook manager written in Ruby that runs linters, tests and custom scripts on commit, push and other Git events. Overcommit manages Git hooks for a repository so that checks such as linters, test runners and formatters run automatically at points like pre-commit, commit-msg, pre-push and post-checkout. Hook behavior is set in a per-repository .overcommit.yml file, which can enable or disable individual hooks, control which files they apply to, and tune options such as parallel execution and failure handling.
- Is overcommit free to use? What license does it have?
- overcommit is open source under the MIT license. Check the license terms before using it in commercial products.
- Is overcommit still maintained?
- Actively maintained. The last commit to overcommit was on Nov 6, 2026.
- What can I use overcommit for?
- Running RuboCop or ESLint automatically before each commit in a team repository. Blocking pushes to protected branches or commits with merge conflict markers. Running the same lint suite in CI as developers run locally before committing.
- How do I install overcommit?
- Install the overcommit gem via RubyGems: gem install overcommit Go to your repository and initialize Git if needed: git init Install the Overcommit hooks into the repository: overcommit --install
- Where can I get overcommit?
- The source code and installation instructions are on GitHub: https://github.com/sds/overcommit
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Rust linter with over 800 lints that catches common mistakes and suggests more idiomatic code, run as a cargo subcommand.
A static code analyser for Python that checks for errors, enforces coding standards, and flags code smells without running your code.
A fast, configurable Go linter that drops in for golint and supports custom rules and output formatters.
A Python linter and formatter that detects and removes unused import statements from your code.
A framework for managing and running multi-language pre-commit hooks that check code before each Git commit.