Skip to content

Commit

Permalink
added husky pre commit to check run lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sadabnepal committed Apr 25, 2024
1 parent 328955b commit edb6926
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ npm run cleanup
- Docker for testing against/using containerization
- Github actions CI/CD integration
- Report portal integration
- dotenv to store secrets locally
- dotenv to store secrets locally
- eslint linting tools integrated
- husky git hooks for pre-commit checks (eslint)

### Folder Structure

```ini
├───.github
├───.husky
├───.vscode
├───.images
├───tests
Expand All @@ -102,6 +105,7 @@ npm run cleanup
| └───types
├───.env
├───.env.example
├───.eslintrc.js
├───.gitignore
├───docker-compose.yml
├───package-lock.json
Expand Down
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"docker:stop": "docker compose -f tests/docker/docker-compose.yml down",
"docker:stop:arm": "docker compose -f tests/docker/docker-compose-arm.yml down",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"prepare": "husky"
},
"author": "MD SADAB SAQIB",
"license": "ISC",
Expand All @@ -35,6 +36,7 @@
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-plugin-wdio": "^8.24.12",
"husky": "^9.0.11",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"wdio-docker-service": "^3.2.1"
Expand Down

0 comments on commit edb6926

Please sign in to comment.