marko-js / language-server

Marko autocomplete, intellisense and editor support.
MIT License
38 stars 8 forks source link

Provide VS Code documentation for style linting #175

Open william-kerr opened 1 year ago

william-kerr commented 1 year ago

When viewing CSS rules in style.less {} in *.marko components in VS Code, I would like to see Stylelint warnings and NOT see duplicate warnings from the Marko extension.

I have figured out how to get:

In the following, I can get a Stylelint warning to show, but cannot figure out how to suppress the duplicate style warning from Marko, from appearing:

<style>
i {
}
</style>

It would be ideal to be able to write the following and see a Stylelint error in VS Code with no duplicate warning from Marko:

style.less {
  i {
  }
}

Please consider supporting that functionality and documenting it.

william-kerr commented 1 year ago

I installed the Svelte VS Code extension to see if they had the same problem. I set up Stylelint and got it to report errors through VS Code. Similar to Marko, there were duplicate warnings showing up, one warning from Svelte and one from Stylelint. The Svelte VS Code extension has this setting, which I couldn't find an equivalent for in the Marko extension:

"svelte.plugin.svelte.compilerWarnings": {
  "css-unused-selector": "ignore"
}

The above setting suppresses the duplicate Svelte warnings, so that only the Stylelint errors show. Is there any equivalent way to suppress style warnings in the Marko VS Code extension so that I can use only Stylelint?