-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description of the bug
wp-scripts-lint.yml uses Stylelint's built-in github formatter:
| run: ./node_modules/.bin/wp-scripts lint-style ${{ inputs.STYLELINT_ARGS }} --formatter github |
This formatter was deprecated in Stylelint 16.8.2 (https://github.com/stylelint/stylelint/releases/tag/16.8.2; see stylelint/stylelint#7909).
Reproduction instructions
- Use the
wp-scripts-lint.ymlworkflow. - See the following deprecation warning in the "Lint style files" step: "Notice: The github formatter is deprecated".
Expected behavior
No deprecation warning.
Environment info
No response
Relevant log output
Additional context
The deprecation warning includes a link to https://stylelint.io/awesome-stylelint/#formatters, which suggests https://github.com/csstools/postcss-plugins/tree/main/plugins-stylelint/formatter-github or https://github.com/xt0rted/stylelint-actions-formatters as alternative GitHub formatters.
A more straightforward but untested approach could be to fetch the matcher JSON from https://github.com/xt0rted/stylelint-problem-matcher/blob/main/src/problem-matcher.json like we do with actionlint:
reusable-workflows/.github/workflows/lint-workflows.yml
Lines 19 to 22 in 299f7bc
| - name: Set up problem matchers for actionlint | |
| run: | | |
| curl -s -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json | |
| echo "::add-matcher::${GITHUB_WORKSPACE}/actionlint-matcher.json" |
Code of Conduct
- I agree to follow this project's Code of Conduct