-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Scss errors are shown only after manual reload or .vue file change #8
Comments
Thanks for your issue. I think it is caused by these. vite-plugin-stylelint/src/index.ts Lines 51 to 71 in 40a4101
I tried to avoid double lint here before to improve performance, but unfortunately didn't cover the hot update. I will post an updated version as soon as possible. I'm very sorry for the inconvenience. |
Thank you for your fast comment. Please keep in mind that it could be this (or a combination) aswell: |
Please try v2.2.3. |
Not really I think. Your problem is caused by the plugin ignoring the hot update part. |
This works perfectly for in-vue scss(scoped in index.vue as my example shows). index.vue:
test.scss:
test.scss DOES compile; but does NOT lint Bare in mind: Running my linter via NPM does pickup the error:
|
What you add is another issue. So I close this issue for now and open another issue focusing the new one. |
Please trace #9. |
I have a pretty vanilla Vite+Vue3+Eslint+Stylelint project running at the moment to see how the setup works.
I've got everything working properly now except for the stylelinter:
Whenever I make an inline scss error and save it; nothing happens. No error is shown in my terminal or my server HMR overlay.
Only after I refresh my browser manually the error is shown. When I fix the error HMR kicks back in and reloads my page without any issue.
Making another change in my .vue file seems to do the trick aswell to fire off the error belatedly.
Since it's pretty annoying to manually refresh or to make another change in my vue file I'd like stylelint to just show me my error right off the bat.
This is my .vue file with the faulty scss:
Obviously
#avc
is incorrect; so it shows me the warning(after refresh or other change):Internal server error: Unexpected invalid hex color "#avc" (color-no-invalid-hex)
My vite.config.js (Located in root, I've tried turning off other plugins etc one-by-one without results)
And my stylelint.config.js (located in root)
And (for what it's worth) my package.json:
As an aside: Importing .scss files in my .vue file or just having existing .scss files aren't even detected by my config at all (although it does function and compile properly)
The text was updated successfully, but these errors were encountered: