Skip to content
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

Provide VS Code documentation for style linting #175

Open
william-kerr opened this issue Jun 18, 2023 · 1 comment
Open

Provide VS Code documentation for style linting #175

william-kerr opened this issue Jun 18, 2023 · 1 comment

Comments

@william-kerr
Copy link

william-kerr commented Jun 18, 2023

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:

  • TailwindCSS providing class name suggestions inside of *.marko files in the <html></html> section
  • Stylelint and TailwindCSS working in *.less files
  • Stylelint working with postcss-html custom syntax in *.marko files if I use <style></style> instead of style {}

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
Copy link
Author

william-kerr commented Jun 20, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant