mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the main branch
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # tag=v3
|
|
with:
|
|
node-version: 17
|
|
|
|
# ESLint and Prettier must be in `package.json`
|
|
- name: Install Node.js dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@42567b31ed576cdd5a431d77ca5bc8822430d1d0 # tag=v1
|
|
with:
|
|
eslint: true
|
|
prettier: true
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
auto_fix: false
|
|
eslint_extensions: ts
|
|
commit_message: "style(auto): fix code style issues with ${linter}" |