-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update warning codes for svelte5 #1044
Conversation
@@ -114,6 +114,7 @@ export function enhanceCompileError(err, originalCode, preprocessors) { | |||
|
|||
// Handle incorrect CSS preprocessor usage | |||
if (err.code === 'css-syntax-error') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dummdidumm whats the new way to identify css syntax errors? i looked but didn't find the corrosponding code in svelte5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two things you can look for:
- any error starting with
css_
- right now it'scss_expected_identifier
,css_selector_invalid
andcss_empty_declaration
- more general errors:
expected_token
andunexpected_eof
- though these could also happen in other parts outside the style sheet (not sure if that is a problem)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added with generic startswith css_ , technically this could introduce false positives for users who don't use a css preprocessor, so if we want to play it conservative, we'd have to use a hardcoded list at the cost of that getting out of date if new codes are added.
* fix: update warning codes for svelte5 * fix(audit): bump nanoid * fix: replace css error code detection so that it works for svelte5 * chore: update changeset (cherry picked from commit e41edff)
needs to be backported to v-p-s@4 too