Skip to content

Commit

Permalink
add if condition and change node version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashleyhx committed Dec 11, 2023
1 parent 89fbb05 commit 21f31cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ module.exports = {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
}
}
}
14 changes: 10 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint
on:
push:
branches:
- main
- master
pull_request:

permissions:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'

- name: Install dependencies
run: npm install
Expand All @@ -34,7 +34,13 @@ jobs:
run: |
./node_modules/.bin/eslint --ext .js,.vue src --fix
- uses: EndBug/add-and-commit@v9
- name: Check if fixes were made
id: check-fixes
run: echo "::set-output name=has_fixes::$(git status --porcelain | grep -E '^(M| M)' | wc -l)"

- name: Commit changes (if fixes were made)
if: steps.check-fixes.outputs.has_fixes > 0
uses: EndBug/add-and-commit@v9
with:
author_name: Lint Bot
message: 'Run linters'
message: 'Run linters'

0 comments on commit 21f31cf

Please sign in to comment.