Skip to content

Commit

Permalink
Check lint and prettier before build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortovoxx committed Mar 8, 2024
1 parent cbd8980 commit b2a7dde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/nextjs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
with:
node-version: '18.x'

- name: Lint
run: npm run lint

- name: Prettier
run: npm run prettier

- name: Start MongoDB
uses: supercharge/[email protected]
with:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload generate:graphQLSchema",
"lint": "eslint src",
"lint:fix": "eslint --fix --ext .ts,.tsx src",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,json,css,scss,html}\"",
"prettier": "prettier --check \"src/**/*.{ts,tsx,js,json,css,scss,html}\"",
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,json,css,scss,html}\"",
"payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload"
},
"dependencies": {
Expand Down

0 comments on commit b2a7dde

Please sign in to comment.