mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the main branch
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request_target:
|
|
branches:
|
|
- main
|
|
permissions:
|
|
checks: write
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # tag=v3
|
|
with:
|
|
node-version: 17
|
|
|
|
# ESLint and Prettier must be in `package.json`
|
|
- name: Install Node.js dependencies
|
|
run: npm i
|
|
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@v2
|
|
with:
|
|
continue_on_error: false
|
|
prettier: true
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
neutral_check_on_warning: true
|
|
eslint_extensions: js
|
|
commit_message: "style(auto): fix code style issues with ${linter}"
|