Skip to content

Adding --no-color flag to stylelint args#5050

Merged
hsanson merged 5 commits intodense-analysis:masterfrom
stevematney:stylelint-no-color
Nov 22, 2025
Merged

Adding --no-color flag to stylelint args#5050
hsanson merged 5 commits intodense-analysis:masterfrom
stevematney:stylelint-no-color

Conversation

@stevematney
Copy link
Contributor

At least some editors don't work on linting because of colors in the stylelint output. This should resolve that.

@rymdbar
Copy link
Contributor

rymdbar commented Oct 4, 2025

Its always great to see bugfix pull-requests!

However, tools should not require such flags when operating on stdin/stdout. That really ought to be a channel without CSI commands. Where is the bug report towards stylelint? Could you please report and attempt getting the problem fixed at the source first, before allowing their issue to cascade into unrelated pieces of software?

In case the stylelint team are unable or unwilling to fix their issue, I guess one could probably add this workaround to ale. Before doing so, one must consider that this fixer integration presumably once worked and that backwards compability is a goal here. If flags are added in later versions, the ale#semver#RunWithVersionCheck helper method is typically used to keep setups working for users who might be stuck on older versions.

A quick look shows that --no-color became documented in stylelint/stylelint#1479, but really belongs to some chalk dependency. How that stuff works requires a bit of effort to figure out though, as the cheeseshop 404:s.

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

@hsanson hsanson merged commit de2d3da into dense-analysis:master Nov 22, 2025
8 checks passed
Caw3 pushed a commit to Caw3/ale that referenced this pull request Dec 10, 2025
* Adding --no-color flag to sass stylelint

* Adding --no-color to all stylelint args

* Adding --no-color expectation to stylelint tests

* Properly handling SyntaxError for stylelint; adding corresponding test

* Fixing CSS stylelint parameters and adding regression test
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

Successfully merging this pull request may close these issues.

3 participants