This project is a configuration template for integrating ESLint, Prettier, and Husky into Node.js projects. It provides pre-configured settings for these tools, which can be easily copied into any Node.js project.
ESLint is used for identifying and reporting on patterns found in ECMAScript/JavaScript code. Prettier is an opinionated code formatter, ensuring that all outputted code conforms to a consistent style. Husky is used to ensure that all commits meet the project's standards by running linters before each commit.
- Node.js >= 21
- npm >= 10
- Clone the repository:
git clone [email protected]:darikletter/nodejs-eslint-prettier-husky.git
- Install dependencies:
npm install
Simply copy the files from this project template to your Node.js project.
cp -R /path-to-template/* /path-to-your-project/
npx husky install
npx husky add .husky/commit-msg 'npm run commit-msg'
npx husky add .husky/pre-commit 'npm run pre-commit'
- Please execute the below command on terminal to hook get executable by default.
- Because files are not executable by default; they must be set to be executable.
chmod ug+x .husky/*
chmod ug+x .git/hooks/*
Releasing is done via release-please-action.
Happy to get your feedback, but also feel free to raise a pull request. ๐ค
This project is licensed under the MIT. See the LICENSE.md file for details.