All Projects → spencerdcarlson → husky-elixir

spencerdcarlson / husky-elixir

Licence: MIT license
🐶 Git hooks made easy

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to husky-elixir

Pre Commit Terraform
pre-commit git hooks to take care of Terraform configurations
Stars: ✭ 902 (+1819.15%)
Mutual labels:  hooks, git-hooks
elint
A easy way to lint your code
Stars: ✭ 38 (-19.15%)
Mutual labels:  git-hooks, husky
Git Good Commit
Git hook to help you write good commit messages, with no external dependencies.
Stars: ✭ 128 (+172.34%)
Mutual labels:  hooks, git-hooks
rusty-hook
git hook manager, geared toward Rust projects
Stars: ✭ 93 (+97.87%)
Mutual labels:  hooks, git-hooks
Husky.Net
Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
Stars: ✭ 394 (+738.3%)
Mutual labels:  git-hooks, husky
uno-game
🎴 An UNO Game made in Javascript
Stars: ✭ 93 (+97.87%)
Mutual labels:  husky
roover
🐱 A lightweight audio library for React apps.
Stars: ✭ 70 (+48.94%)
Mutual labels:  hooks
stook
A minimalist design state management library for React.
Stars: ✭ 86 (+82.98%)
Mutual labels:  hooks
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+717.02%)
Mutual labels:  husky
cra-template-react-template
🤘 My bootstrap template to use in react
Stars: ✭ 15 (-68.09%)
Mutual labels:  husky
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (-65.96%)
Mutual labels:  hooks
angulareact
A way to seamlessly integrate React and AngularJS
Stars: ✭ 17 (-63.83%)
Mutual labels:  hooks
jedisdb
redis like key-value state management solution for React
Stars: ✭ 13 (-72.34%)
Mutual labels:  hooks
statery
Surprise-Free State Management! Designed for React with functional components, but can also be used with other frameworks (or no framework at all.)
Stars: ✭ 28 (-40.43%)
Mutual labels:  hooks
use-redux-hook
A simple react hook to get access to redux store
Stars: ✭ 13 (-72.34%)
Mutual labels:  hooks
react-use-observer
Performant react hooks for WebApi Observers, useResizeObserver, useInteractionObserver, useMutationObserver
Stars: ✭ 19 (-59.57%)
Mutual labels:  hooks
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-48.94%)
Mutual labels:  hooks
coconat
🍥 StarterKit Builder for rocket-speed App creation on 🚀 React 17 + 📙 Redux 4 + 🚠 Router 5 + 📪 Webpack 5 + 🎳 Babel 7 + 📜 TypeScript 4 + 🚔 Linters 23 + 🔥 HMR 3
Stars: ✭ 95 (+102.13%)
Mutual labels:  hooks
react-use-redux
Alternative Redux bindings with upcoming React hooks
Stars: ✭ 31 (-34.04%)
Mutual labels:  hooks
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (-63.83%)
Mutual labels:  husky

Husky

Mac/Linux Build Status Hex.pm Hex.pm

Git hooks made easy

Description

Husky is an elixir version of the husky npm module.

Husky can prevent bad git commit, git push and more 🐶 ❤️ woof!

Installation

The Husky Hex package can be installed by adding husky to your list of dependencies in mix.exs:

defp deps do
  [
    {:husky, "~> 1.0", only: :dev, runtime: false}
  ]
end

Usage

  • On compile, husky will install git hook scripts (mix husky.install to install manually)
  • Configure git hook commands in either your config/dev.exs or a .husky.json file
    • Note: config/dev.exs will take precedence over .husky.json if there are key conflicts
Configure Git Hooks Using config/config.exs:
use Mix.Config
config :husky,
    pre_commit: "mix format && mix credo --strict",
    pre_push: "mix format --check-formatted && mix credo --strict && mix test"

View example file config.example.exs

.husky.json

Configure Git Hooks Using .husky.json:
{
  "husky": {
    "hooks": {
      "pre_commit": "mix format && mix credo --strict",
      "pre_push": "mix format --check-formatted && mix credo --strict && mix test"
    }
  }
}

View example file .husky.example.json

With the above setup:

  • git commit will execute mix format and mix credo --strict and only commit if credo succeeds.
  • git push will execute mix format, mix credo, and mix test, and only push if all three commands succeed.
  • git commit --no-verify still commit even if mix credo --strict fails
Skip script install
export HUSKY_SKIP_INSTALL=true
Temporarily skip hooks
HUSKY_SKIP_HOOKS=true git rebase -i develop
Delete
  • Remove git hook scripts mix husky.delete

Documentation can found at https://hexdocs.pm/husky.

Contributing

See the development README.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].