Skip to content

Commit

Permalink
Update README example
Browse files Browse the repository at this point in the history
  • Loading branch information
ataylorme committed Feb 22, 2024
1 parent 51466bb commit ff23473
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This allows for more flexibility on how ESLint is run. This action is agnostic e

| Name | Description | Required | Default Value |
|---|---|---|---|
| `repo-token` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | No | `${{ github.token }}` |
| `GITHUB_TOKEN` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | No | `${{ github.token }}` |
| `report-json` | Path or [glob pattern](https://github.com/actions/toolkit/tree/master/packages/glob) to locate the ESLint report JSON file. Use multiple lines to specify multiple glob patterns. | No | `eslint_report.json` |
| `only-pr-files` | Only annotate files changed when run on the `pull_request` event | No | `true` |
| `fail-on-warning` | Fail the GitHub Action when ESLint warnings are detected. Set to `true` to enable. | No | `false` |
Expand Down Expand Up @@ -54,11 +54,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'npm'
- name: Install Node Dependencies
run: npm ci
Expand All @@ -74,12 +74,13 @@ jobs:
# Continue to the next step even if this fails
continue-on-error: true
- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
uses: ataylorme/eslint-annotate-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
report-json: "eslint_report.json"
# OPTIONAL: save a copy of the usage report for download or use in another job
# - name: Upload ESLint report
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: eslint_report.json
# path: eslint_report.json
Expand Down

0 comments on commit ff23473

Please sign in to comment.