-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unknown word (CssSyntaxError) #39
Comments
I'm also experiencing this. I added I tried moving my ignore to the |
Thanks for your reply @lougreenwood. This "fixes" the issue, but only because this project is SCSS-based, instead of using some kind of CSS-in-JS, in that case that wouldn't be possible. Regards, David. |
@thedaviddelta I wonder, is your project a mono-repo? I wonder if @bmatcuk - do you have any ideas here? |
For me seems like
My // @ts-check
/* try to move from mjs to js when
* https://github.com/stylelint/stylelint/issues/5291
* gets resolved
*/
/** @type {import("stylelint").Config} */
const config = {
extends: [
"stylelint-config-html/html",
"stylelint-config-html/svelte",
"stylelint-config-recommended",
],
rules: {
/* validate not only property name, but also property value */
"declaration-property-value-no-unknown": true,
/* add svelte's :global selector */
"selector-pseudo-class-no-unknown": [
true,
{
ignorePseudoClasses: ["global"],
},
],
},
};
export default config; I just don't understand why stylelint-lsp tries to lint js code, shows some errors, when stylelint cli works fine. This is indeed bug of LSP, and ideally I would not like to include these ignores in my project's configuration. Luckily I don't use any css code in these files... |
I borrowed the default configuration from some other css lsp server - it was so long ago, I forget what it was now. But, it included js/jsx files likely because it was common to include css in jsx at the time. Anyway, if you'd prefer that it didn't do that, you can change that as part of your neovim config. See the default configuration here. Relevant part is the require'lspconfig'.stylelint_lsp.setup{
filetypes = {
'css',
'less',
'scss',
'sugarss',
'vue',
'wxss',
},
settings = {
stylelintplus = {
-- see available options in stylelint-lsp documentation
}
}
} |
Hello and thanks for this project!
I've just installed the Stylelint LSP in my Neovim for interacting with an existing project that uses Stylelint, and I'm getting this strange error at the top of every
tsx
file, as well as other strange reports ints
files at random positions (likeMissed semicolon (CssSyntaxError)
).I've been searching online and found this issue (stylelint/stylelint#5864) in the official Stylelint repo, talking about some issues with the Stylelint 14 migration.
In this issue, the maintainer suggests it may be an issue with the VSCode plugin version, and then when told it's happening in Webstorm he suggests it's an issue with Webstorm's plugin too. I've then tested this project in both Webstorm and VSCode and found no issues, so I think this may be related to an issue that was already addressed there but maybe not in this LSP.
Some extra info that may be relevant is that this project uses the 14th version of Stylelint, and extends
stylelint-config-sass-guidelines
(that according to the maintainer in that same issue, it does the same asstylelint-config-standard-scss
).Thanks and regards, David.
The text was updated successfully, but these errors were encountered: