-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 1.09 KB
/
stylelint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: stylelint
on:
pull_request:
branches: ["**"]
push:
branches: ["main"]
workflow_dispatch:
jobs:
stylelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo ::set-output name=nvmrc::$(cat .nvmrc)
id: nvm
- uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.nvmrc }}"
# https://github.com/actions/toolkit/blob/2f164000dcd42fb08287824a3bc3030dbed33687/docs/commands.md#problem-matchers
# https://gist.github.com/ybiquitous/184a337662bfcafdd3d227253f9401ff
- name: Set up Problem Matchers for stylelint
run: |
curl -fLO "https://gist.githubusercontent.com/ybiquitous/184a337662bfcafdd3d227253f9401ff/raw/ca3681c9b01347fe7af612f4fd64384f135890c7/stylelint-compact.json"
mv stylelint-compact.json "${HOME}/stylelint-compact.json"
echo "::add-matcher::${HOME}/stylelint-compact.json"
- run: npm install stylelint stylelint-config-standard stylelint-a11y stylelint-high-performance-animation
- run: npx stylelint "**/*.css" --formatter=compact