Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint-staged): correct command for lint staged eslint #860

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading