1.0.4 • Published 5 years ago
create-lint-format v1.0.4
create-lint-format
Init eslint, prettier, and lint-staged with pre-commit git hook
When we start working with a new project, setting up eslint, prettier, and lint-staged is tedious. So, I decide to make an npm script to do these steps for us.
What the Script Does
- Install devDependencies – "eslint","prettier","lint-staged","simple-git-hooks","shell-quote","@thaicoding/eslint-config","@thaicoding/prettier-config"
- Add
simple-git-hooksproperty topackage.json - Update
pre-commithook to runlint-stagedbefore we commit code - Create
lint-staged.config.cjs - Create
.eslintrc.cjs - Create
.prettierrc.cjs - Create
tsconfig.jsonif not exist
How to Use
In your project directory, run this command.
$ npm init lint-formatLicense
This project is licensed under the MIT License