Skip to content

Commit

Permalink
feat: re-parse after running --fix
Browse files Browse the repository at this point in the history
Related to, but does not fully address, #19.

> NOTE: this PR also enables the vitest plugin

Adds a step to the test stage that re-runs oxlint after it was previously run
with `--fix`. This should help us catch syntax errors created by buggy fixes.

We should also consider running `typecheck` scripts for repositories that have
them.
  • Loading branch information
DonIsaac committed Jul 10, 2024
1 parent 2b6cfe5 commit af8b62a
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,21 @@ jobs:

- name: Check Panic
working-directory: ${{ matrix.path }}
# NOTE (@DonIsaac): should we enable import-plugin?
# NOTE (@DonIsaac): should we test nursery rules too?
run: |
set +e # disable exit on run
./oxlint --fix --jest-plugin --jsdoc-plugin --jsx-a11y-plugin --nextjs-plugin --react-perf-plugin -D all --silent
./oxlint \
--fix \
--jsdoc-plugin \
--jest-plugin \
--vitest-plugin \
--jsx-a11y-plugin \
--nextjs-plugin \
--react-perf-plugin \
-D all \
--silent
EXIT_CODE=$?
Expand All @@ -135,6 +146,23 @@ jobs:
echo "exitcode=0" >> $GITHUB_OUTPUT
exit 0
# Check for invalid syntax after lint rule violations have been fixed.
# All lint rules are set to `warning` here, so an exit code > 0 is either
# a parse error or a panic.
- name: Re-Parse After `--fix`
working-directory: ${{ matrix.path }}
run: |
./oxlint \
--fix \
--jsdoc-plugin \
--jest-plugin \
--vitest-plugin \
--jsx-a11y-plugin \
--nextjs-plugin \
--react-perf-plugin \
-W all \
--silent
comment:
needs: test
if: ${{ always() }}
Expand Down

0 comments on commit af8b62a

Please sign in to comment.