Skip to content

Commit

Permalink
Update Caching Action and Linting Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCode92 committed Dec 12, 2024
1 parent 27a7d79 commit 0815dc8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/actions/cached-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
outputs:
used-cache:
description: "Whether the cache was used or not."
value: ${{ steps.install.outputs.cache }}
value: ${{ steps.set-output.outputs.used-cache }}
runs:
using: "composite"
steps:
Expand All @@ -23,6 +23,8 @@ runs:
id: install
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
shell: bash
run: |
npm ci
echo "cache='${{ inputs.caching }}'" >> $GITHUB_OUTPUT
run: npm ci
- name: Set output
id: set-output
shell: bash
run: echo "used-cache='${{ steps.cache.outputs.cache-hit }}'" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Load & cache dependencies
uses: ./.github/actions/cached-deps
- name: Run the linter
run: npm run lint
run: npm run lint -- --max-warnings=0
test:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# .husky/pre-commit
#prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
git update-index --again
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "tsc -b && vite build",
"test": "vitest",
"format": "prettier --write .",
"lint": "eslint . --max-warnings=0",
"lint": "eslint .",
"preview": "vite preview",
"prepare": "husky"
},
Expand Down

0 comments on commit 0815dc8

Please sign in to comment.