ci: simplify and integrate lint code (#286)

This commit is contained in:
Dayong Lee 2024-07-23 23:19:10 +09:00 committed by GitHub
parent 0896d5e517
commit 3911ae8cfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,10 +31,11 @@ jobs:
- setup
- run:
name: ESLint
command: yarn eslint -c .eslintrc.js $(git diff --name-only --diff-filter=ACMRUXB origin/main | grep -E "(.js$|.ts$)")
shell: bash -e
command: git diff --name-only --diff-filter=ACMRUXB origin/main | grep -E "(.js$|.ts$)" | xargs -r yarn eslint -c .eslintrc.js
- run:
name: Prettier
command: modifiedFiles=$(git diff --name-only --diff-filter=ACMRUXB origin/main | grep -E "(.js$|.ts$)") && [ -n "$modifiedFiles" ] && yarn prettier -c $modifiedFiles || echo "No modified files."
command: git diff --name-only --diff-filter=ACMRUXB origin/main | xargs -r yarn prettier -c --ignore-unknown
typecheck:
docker:
- image: cimg/node:20.12