File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 files :
77 type : string
88 default : " **/*.css"
9+ stylelint_config_recess_order_version :
10+ type : string
11+ default : " latest"
12+ stylelint_config_standard_version :
13+ type : string
14+ default : " latest"
915 stylelint_version :
1016 type : string
1117 default : " latest"
2329 - name : Lint CSS files
2430 env :
2531 INPUTS_FILES : ${{ inputs.files }}
32+ INPUTS_STYLELINT_CONFIG_RECESS_ORDER_VERSION : ${{ inputs.stylelint_config_recess_order_version }}
33+ INPUTS_STYLELINT_CONFIG_STANDARD_VERSION : ${{ inputs.stylelint_config_standard_version }}
2634 INPUTS_STYLELINT_VERSION : ${{ inputs.stylelint_version }}
35+ # zizmor: ignore[adhoc-packages] This reusable workflow intentionally installs caller-selected stylelint packages on ephemeral runners.
2736 run : |
2837 set -euo pipefail
2938
3544 # Split INPUTS_FILES into an array (space-separated)
3645 IFS=' ' read -r -a files <<<"$INPUTS_FILES"
3746
38- npx --yes "stylelint@${INPUTS_STYLELINT_VERSION}" -- "${files[@]}"
47+ npm install \
48+ --no-save \
49+ --no-package-lock \
50+ --ignore-scripts \
51+ "stylelint@${INPUTS_STYLELINT_VERSION}" \
52+ "stylelint-config-recess-order@${INPUTS_STYLELINT_CONFIG_RECESS_ORDER_VERSION}" \
53+ "stylelint-config-standard@${INPUTS_STYLELINT_CONFIG_STANDARD_VERSION}"
54+
55+ npx --no-install stylelint -- "${files[@]}"
Original file line number Diff line number Diff line change @@ -144,16 +144,19 @@ Detects common misspellings across files using
144144
145145# # check-stylelint.yml
146146
147- Lints CSS files using [stylelint](https://stylelint.io/). By default, it runs
148- the latest published stylelint package through `npx`; callers can pin
149- ` stylelint_version` when they need a fixed version.
147+ Lints CSS files using [stylelint](https://stylelint.io/). By default, it
148+ installs the latest published `stylelint`, `stylelint-config-standard`, and
149+ ` stylelint-config-recess-order` packages into the runner workspace; callers can
150+ pin package versions when they need fixed versions.
150151
151152**Inputs**
152153
153- | Name | Required | Default |
154- | ------------------- | -------- | ---------- |
155- | `files` | false | `**/*.css` |
156- | `stylelint_version` | false | `latest` |
154+ | Name | Required | Default |
155+ | --------------------------------------- | -------- | ---------- |
156+ | `files` | false | `**/*.css` |
157+ | `stylelint_config_recess_order_version` | false | `latest` |
158+ | `stylelint_config_standard_version` | false | `latest` |
159+ | `stylelint_version` | false | `latest` |
157160
158161**Typical usage with changed files**
159162
You can’t perform that action at this time.
0 commit comments