question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide integration wit stylelint

See original GitHub issue

Now that prettier supports CSS/SCSS formatting, it would be really nice to integrate prettier-vscode with stylelint in a manner similar to what is done with eslint integration for JavaScript files.

Ideally, there should be a config option to enable/disable this integration (just like with eslint), so that the SCSS/CSS styles formatted with prettier are then auto-fixed via stylelint to confirm to stylelint rules.

Stylelint is adding more and more support for its --fix functionality.

Here’s one of the use cases I have: The source base I am working on has a stylelint rule that all color HEX values must be uppercase. Prettier formats the HEX values to be lowercase, which breaks stylelint checks.

And since prettier is an ‘opinionated’ formatter, it doesn’t provide a way to configure this behavior.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hugomrdiascommented, Sep 11, 2017

Working on this, already have a basic version of a prettier-stylelint tool a few more tests and I’ll do a PR here adding support for it.

0reactions
github-actions[bot]commented, Apr 13, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started | Stylelint
Getting started. You can lint: CSS files by using our standard config; everything else by using extensions written by the community ...
Read more >
What is stylelint and how to integrate a modern CSS linter in ...
Stylelint is a tool that reports bad code in your CSS files. It helps to enforce the consistent code and prevents you from...
Read more >
Level up your CSS linting using Stylelint - LogRocket Blog
For Vue CLI, you can install the npm package @steveworkman/vue-cli-plugin-stylelint to integrate Stylelint for you. To add it to an existing ...
Read more >
Stylelint with SPFx integration - SharePoint
stylelint uses almost the same concepts as tslint. First of all you should create a configuration file, which describes your rules. You can...
Read more >
Stylelint | WebStorm Documentation - JetBrains
WebStorm integrates with Stylelint so you can inspect your CSS code from inside the IDE. Stylelint wakes up automatically when you edit a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found