orangeCatDeveloper opened a new pull request, #4241:
URL: https://github.com/apache/hertzbeat/pull/4241
Close #3728
### What's changed
`npm run lint:style` crashed immediately with:
```
Error: The "syntax" option is no longer available. You should install an
appropriate syntax, e.g. postcss-scss, and use the "customSyntax" option
```
stylelint 14 removed the `--syntax` CLI flag, but the `lint:style` script
still
passed `--syntax less`, so the command errored out before linting anything.
Fix, following stylelint's own migration guidance:
- `package.json`: drop the removed `--syntax less` flag from `lint:style`.
- `.stylelintrc`: declare `"customSyntax": "postcss-less"` (applies to every
invocation, incl. lint-staged and IDE integrations).
- Add `[email protected]` — the postcss 8 compatible line (stylelint 14 uses
postcss 8; the older 3.1.4 requires postcss 7 and would mismatch).
### Test plan
- `cd web-app && npm run lint:style`
- Before: crashes on `The "syntax" option is no longer available`.
- After: stylelint runs and lints the `.less` files (exits with the existing
style violations instead of crashing).
### Note
Once the command runs, it surfaces a backlog of pre-existing `.less` style
violations. Those are unrelated to this change and `lint:style` is not
currently
wired into CI or a pre-commit hook, so they block nothing. Cleaning them up
(and
optionally enforcing the lint) is left as a separate follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]