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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore: ["consecutive-duplicates-with-same-prefixless-values"] to declaration-block-no-duplicate-properties #5609

Merged
merged 1 commit into from Oct 29, 2021

Conversation

MightyCreak
Copy link
Contributor

Add ignore option consecutive-duplicates-with-same-prefixless-values
to rule consecutive-duplicates-with-same-prefixless-values.

Which issue, if any, is this issue related to?

Closes #5607

Is there anything in the PR that needs further explanation?

No, it's pretty self-explanatory I think, but it's the first time I contribute to stylelint and to any JS project, so bare with me please 馃槈

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@MightyCreak Thanks for the pull request. It's looking good so far.

I've requested a change.

This option has the scope to be much broader, e.g. the following should be allowed:

a {
  background: -webkit-linear-gradient(red, blue), -webkit-linear-gradient(black, white);
  background: linear-gradient(red, blue), linear-gradient(black, white);
}

But this will be more involved and will require using the value parser. As such, I think we're okay to introduce the option in its current form and this more complex use case can be addressed later down the line only if there's a real-world need for it.

@jeddy3 jeddy3 changed the title Add consecutive-duplicates-with-same-prefixless-values ignore option Add ignore: ["consecutive-duplicates-with-same-prefixless-values"] to declaration-block-no-duplicate-properties Oct 21, 2021
@MightyCreak
Copy link
Contributor Author

MightyCreak commented Oct 21, 2021

This option has the scope to be much broader, e.g. the following should be allowed:

a {
  background: -webkit-linear-gradient(red, blue), -webkit-linear-gradient(black, white);
  background: linear-gradient(red, blue), linear-gradient(black, white);
}

But this will be more involved and will require using the value parser. As such, I think we're okay to introduce the option in its current form and this more complex use case can be addressed later down the line only if there's a real-world need for it.

@jeddy3 It is indeed a bit more complex to test 馃槄
I could look into it once this PR is merged (we know this one works, I'd rather land it right now before messing with it 馃槅 )

@MightyCreak
Copy link
Contributor Author

@jeddy3 I think my PR is ready to be reviewed ;)

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Looking good.

I've requested a change to the problem messages.

I could look into it once this PR is merged

Thanks, but let's wait until someone requests the feature before we add it.

@MightyCreak
Copy link
Contributor Author

MightyCreak commented Oct 27, 2021

We'll need update tests to reflect this.

@jeddy3 it's fixed and the tests are updated as well (I needed to edit an older test in order to correspond with the new error message, see a52e9e8)

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM!

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM 馃憤馃徏

I've left a trivial suggestion but I think this is ready to merge!

Add ignore option `consecutive-duplicates-with-same-prefixless-values`
to rule `consecutive-duplicates-with-same-prefixless-values`.

Fixes #5607
@jeddy3 jeddy3 merged commit d722e07 into stylelint:main Oct 29, 2021
@jeddy3
Copy link
Member

jeddy3 commented Oct 29, 2021

Changelog entry added:

  • Added: ignore: ["consecutive-duplicates-with-same-prefixless-values"] to declaration-block-no-duplicate-properties (#5609).

HolgerJeromin added a commit to HolgerJeromin/schemastore that referenced this pull request Jun 28, 2023
madskristensen pushed a commit to SchemaStore/schemastore that referenced this pull request Jun 30, 2023
jmatias pushed a commit to jmatias/schemastore that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants