This repository is a small demo on how to use eslint, prettier, commitlint, husky and lint-staged to put together a pre-commit workflow to sanitize your code.
For this demo, we are using airbnb's eslint base config with typescript-eslint to maintain a consistent code-style in the codebase.
When used in modern IDEs or script editors, the linting/formatting functions can be enabled on-save to format the current file. Otherwise, the pre-commit
and commit-msg
git hooks will be used to format all the relevant staged files, and also make sure the commit messages follow conventional commit specifications.