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

Disable autofix for declaration-block-no-redundant-longhand-properties #332

Open
ybiquitous opened this issue Aug 16, 2024 · 3 comments
Open
Labels
status: needs discussion triage needs further discussion

Comments

@ybiquitous
Copy link
Member

ybiquitous commented Aug 16, 2024

What is the problem you're trying to solve?

We often find autofix bugs for declaration-block-no-redundant-longhand-properties

Currently, implementing autofix for new properties in this rule is challenging.

What solution would you like to see?

How about disabling autofix for this rule?

'declaration-block-no-redundant-longhand-properties': true,

E.g.

'declaration-block-no-redundant-longhand-properties': [true, {disableFix: true}],
@Mouvedia
Copy link
Member

Mouvedia commented Aug 16, 2024

How about disabling autofix for this rule?

I would say we should state what we will have to achieve to re-enable the autofix before disabling it.
Here's my take, it should handle:

stylelint/stylelint#7631 is a nice long term goal but it shouldn't be necessary to turn off disableFix.
If we are agreeing on a list, it should also be part of the commit message.

@ybiquitous
Copy link
Member Author

@Mouvedia Thanks for the info. Considering conditions to re-enable autofix sounds reasonable. 👍🏼

@romainmenke Can you please hear your thoughts if you have any?

@romainmenke
Copy link
Member

Can we iterate on this?

I think it's fine if we make some structural improvements and then re-enable the autofix.
We can then evaluate how many and how often we receive bug reports and decide if we want to keep the autofix or disable it again while awaiting more improvements.

This list seems fine to me:

#332 (comment)


I would also suggest adding some tooling around logical props.

See how we use @webref/css to build a graph of constituent props for @mrhenry/stylelint-mrhenry-prop-order

@webref/css is scraped from the css draft specs.

We use it as a dev dependency in @mrhenry/stylelint-mrhenry-prop-order to inform us when new properties have been specced.

A similar approach could be used to get a signal here?

This could allow us to be more accurate and more up to date with the mapping of shorthands and longhands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs discussion triage needs further discussion
Development

No branches or pull requests

3 participants