Skip to content

Commit

Permalink
chore(lint-staged): correct command for lint staged eslint (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Feb 7, 2024
1 parent b72be42 commit 85f1ffa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install validate-branch-name;
npm run lint:staged;
npm run lint:staged:fix;
npm run test:staged;
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ pnpm run lint
pnpm run lint:fix

# Lint and fix only on staged files (runs on pre-commit)
pnpm run lint:staged
pnpm run lint:staged:fix
```

### 🥇 Project quality scanner
Expand Down
3 changes: 3 additions & 0 deletions config/lintstaged/.lintstagedrc.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,ts}": "eslint --fix"
}
3 changes: 0 additions & 3 deletions config/lintstaged/.lintstagedrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "git+https://github.com/antoinezanardi/werewolves-assistant-api-next.git"
},
"scripts": {
"prepare": "is-ci || husky install",
"prepare": "is-ci || husky",
"prebuild": "rimraf dist",
"build": "cross-env NODE_ENV=production nest build",
"docker:dev:start": "docker rmi antoinezanardi/werewolves-assistant-api-dev; docker-compose -f docker/werewolves-assistant-api-dev/docker-compose.yml up -d",
Expand All @@ -45,8 +45,8 @@
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main.js",
"lint": "eslint .",
"lint:staged": "lint-staged -c config/lintstaged/.lintstagedrc.json",
"lint:fix": "eslint . --fix",
"lint:staged:fix": "lint-staged -c config/lintstaged/.lintstagedrc.eslint.json",
"test": "cross-env NODE_ENV=test jest --config config/jest/jest-global.ts",
"test:staged": "cross-env NODE_ENV=test jest --config config/jest/jest-global.ts -o",
"test:watch": "cross-env NODE_ENV=test jest --watch --config config/jest/jest-global.ts",
Expand Down

0 comments on commit 85f1ffa

Please sign in to comment.