mirror of
https://github.com/sern-handler/templates
synced 2026-06-06 01:16:58 +00:00
38 lines
986 B
YAML
38 lines
986 B
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@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # 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@42567b31ed576cdd5a431d77ca5bc8822430d1d0 # tag=v1
|
|
with:
|
|
eslint: false
|
|
prettier: true
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
auto_fix: false
|
|
commit_message: "style(auto): fix code style issues with ${linter}" |