21 lines
788 B
YAML
21 lines
788 B
YAML
name: lint-checks
|
|
description: >
|
|
Style and hygiene checks: prettier (via the repo's format:check script),
|
|
eslint (via the repo's lint script), and conventional-commit linting when
|
|
a commitlint config exists. Each check is --if-present/config-gated, so
|
|
repos opt in by defining the script or config. Run after node-checks in
|
|
the same job (needs node_modules from npm ci).
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- run: npm run format:check --if-present
|
|
shell: bash
|
|
- run: npm run lint --if-present
|
|
shell: bash
|
|
- shell: bash
|
|
run: |
|
|
if ls commitlint.config.* .commitlintrc* >/dev/null 2>&1; then
|
|
npx --no-install commitlint --last --verbose
|
|
else
|
|
echo "no commitlint config, skipping conventional-commit check"
|
|
fi
|