Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Option to follow only rules described in .stylelintrc #86

@cbrwizard

Description

@cbrwizard

Hey, it's great that you added support for .stylelintrc!
I started using it in my project and I have noticed that, apparently, stylefmt uses a merging strategy when choosing rules: it follows .stylelintrc rules and also applies stylefmt's standard ones for the rules it didn't find/recognize in .stylelintrc.
For instance, I follow stylelint-config-standard rules, where a block like

.selector-x { width: 10%; }

is allowed. Having a .stylelintrc with these simple contents

{
  "extends": "stylelint-config-standard"
}

does not raise an error or a warning when running stylelint for a block like the one ^. However, it gets auto formatted into

.selector-x { 
  width: 10%;
}

when I run stylefmt.

I think it would be great if there was a CLI option --only-stylelint or something like that which when passed would force stylefmt to format only the rules found/recognized in .stylelintrc file and do not do anything extra.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions