diff --git a/.github/workflows/bump_oxlint.yml b/.github/workflows/bump_oxlint.yml index 3c77027..ed1679d 100644 --- a/.github/workflows/bump_oxlint.yml +++ b/.github/workflows/bump_oxlint.yml @@ -23,7 +23,9 @@ jobs: pnpm update --latest oxlint pnpm run clone pnpm run generate # Generate rules from latest oxlint + pnpm run format # run prettier over it pnpm run test -u # Update test snapshots + pnpm run build # build cjs, mjs and d.ts files npm version ${{ inputs.version }} --no-git-tag-version - uses: peter-evans/create-pull-request@v7 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..d0a598b --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,18 @@ +name: Format (prettier) + +on: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + - 'renovate/**' + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run Format (prettier) + run: npx prettier . --check diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..a57d9ba --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + - 'renovate/**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/actions/pnpm + + - name: Run oxlint + run: npx oxlint + + - name: Run eslint + run: npx eslint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20ce761..f5a628b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,5 @@ jobs: - uses: ./.github/actions/pnpm - - name: Run Linters - run: pnpm run lint - - name: Run tests run: pnpm run test --coverage diff --git a/.prettierignore b/.prettierignore index f216e7a..0a8eaa6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ pnpm-lock.yaml -rules.js -rules.cjs +lib/ ~ diff --git a/eslint.config.js b/eslint.config.js index 72c433a..0e47630 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -14,6 +14,6 @@ export default [ eslintConfigPrettier, oxlint.configs['flat/all'], { - ignores: ["lib/"] + ignores: ['lib/'], }, ];