You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When /* stylelint-ignore */ is added to the top of a file, the module throws with:
TypeError: Cannot read properties of undefined (reading 'css')
at /node_modules/vite-plugin-checker/dist/esm/logger.js:283:41
at Array.map (<anonymous>)
at normalizeStylelintDiagnostic (/node_modules/vite-plugin-checker/dist/esm/logger.js:258:30)
at /node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/main.js:91:47
at Array.map (<anonymous>)
at Object.configureServer (/node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/main.js:91:36)
Reproduction
Add /* stylelint-ignore */ to the top of any file, observe the error.
### Additional context
Offending line is here: https://github.com/fi3ework/vite-plugin-checker/blob/e564641ac312eba95286b717177af27eb48bcf07/packages/vite-plugin-checker/src/logger.ts#L427C28-L427C28
Updating with optional chaining to `diagnostic?._postcssResult?.css ?? ''` fixes the issue!
### Validations
- [X] Read the [docs](https://github.com/fi3ework/vite-plugin-checker#readme).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The text was updated successfully, but these errors were encountered:
Describe the bug
When
/* stylelint-ignore */
is added to the top of a file, the module throws with:Reproduction
Add
/* stylelint-ignore */
to the top of any file, observe the error.Expected behavior
The process doesn't crash! ;)
System Info
The text was updated successfully, but these errors were encountered: