Skip to content

Commit

Permalink
upd: new lint for updated files
Browse files Browse the repository at this point in the history
  • Loading branch information
DevTeaLeaf committed Jul 21, 2024
1 parent d007095 commit a5b9bf2
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/1_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,23 @@ jobs:
- name: Install dependencies
run: |
yarn add eslint eslint-plugin-astro @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-prettier astro-eslint-parser --dev
- name: Run ESLint
# - name: Run ESLint
# run: |
# export NODE_OPTIONS=--max-old-space-size=16384
# yarn lint --max-warnings 0
# timeout-minutes: 60
- name: Get list of changed files
id: changed-files
run: |
git diff --name-only ${{ github.event.before }} ${{ github.sha }} > changed_files.txt
- name: Run ESLint on changed files
run: |
export NODE_OPTIONS=--max-old-space-size=32768
yarn lint
CHANGED_FILES=$(cat changed_files.txt | grep -E '\.(ts|tsx|astro)$' | tr '\n' ' ')
if [ -n "$CHANGED_FILES" ]; then
yarn eslint $CHANGED_FILES --cache --max-warnings 0
else
echo "No TypeScript or Astro files changed."
fi
timeout-minutes: 60

0 comments on commit a5b9bf2

Please sign in to comment.