After cloning this repository, follow these steps:
npm installThis will install:
- ESLint for JavaScript linting
- Markdownlint for Markdown linting
- Husky for Git hooks
- Lint-staged for running linters on staged files
Run the linters to make sure everything is working:
npm run lintThe pre-commit hook should now be active. Try making a commit to verify it works.
# Run all linters
npm run lint
# Run JavaScript linter only
npm run lint:js
# Run Markdown linter only
npm run lint:md
# Auto-fix all issues
npm run lint:fix
# Auto-fix JavaScript issues
npm run lint:js:fix
# Auto-fix Markdown issues
npm run lint:md:fixIf the pre-commit hook doesn't run automatically:
npm run prepareIf you get permission errors on Unix/Mac:
chmod +x .husky/pre-commitTo completely reinstall:
rm -rf node_modules package-lock.json
npm installSee CONTRIBUTING.md for detailed contributing guidelines.