Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a auto fix lint warning issues using workflow #3913

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/autofix-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Auto Fix Lint Issues

on:
push:
branches:
- master
pull_request:
branches:
- master

# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
checks: write
contents: write

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install
run: npm install

- name: Run linters
uses: wearerequired/lint-action@v2
with:
# Enable your linters here
eslint: true
auto_fix: true
5 changes: 4 additions & 1 deletion server/uptime-kuma-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,11 @@
}
}

/**

Check warning on line 419 in server/uptime-kuma-server.js

View workflow job for this annotation

GitHub Actions / check-linters

Missing JSDoc @returns declaration
*
*/
getUserAgent() {
return "Uptime-Kuma/" + require("../package.json").version
return "Uptime-Kuma/" + require("../package.json").version;
}
}

Expand Down
Loading