This project provides a template for configuring ESLint, Prettier, and Husky in Node.js projects.
- Node.js >= 20
- npm >= 10
- Clone the repository:
git clone git@github.com:neverovski/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/
ESLint: Configuration is in the .eslintrc.js file. Customize as needed. Prettier: Configuration in the .prettierrc file. Modify as necessary. Husky: Pre-configured to run linters before commit. Configuration in .husky directory
- 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/*
$ npm run commit
Happy to get your feedback, but also you are feel free to raise a pull request.
This project is licensed under the MIT. See the LICENSE.md file for details.