[1.0] Add a precommit hook for auto-formatting
See original GitHub issueFor now, it’s a bit painful to do yarn format
on each commit if we want have beautiful commit (and avoid an ugly final commit for format all forgotten stuffs).
The idea is to add Hunsky & lint-staged for auto-fix each staged file. (example on my wip gatsby-starter)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Automatically format and lint code with pre-commit - Interrupt
How to use pre-commit for automated linting, formatting, and styling firmware code by using Python, clang-format, clang-tidy, and prettier.
Read more >Formatting in pre-commit hook - Git
This scripts tracks any of the java or kotlin files in the staging area. · Formats the code using spotless if there are...
Read more >pre-commit
We built pre-commit to solve our hook issues. It is a multi-language package manager for pre-commit hooks. You specify a list of hooks...
Read more >Clojure: code formatting pre-commit hook with zprint
This article will cover setting up pre-commit to automatically format Clojure code with zprint to achieve a more streamlined workflow.
Read more >a hook for jsonnet formatting · Issue #1785 · pre-commit/ ...
I add following in .pre-commit-hooks.yaml of a repo: `git-hooks`: - id: jsonnet-format name: Format should be valid for jsonnet/libsonnet ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ahem 😉 http://jlongster.com/prettier-1.0 and https://github.com/gatsbyjs/gatsby/pull/797
This is another guide that probably says the same thing as ^^^ https://medium.com/@brindelle/format-your-javascript-with-prettier-before-committing-177079ec356a