rewrite-url docs: Use languageOptions in stylelint config#1587
Merged
romainmenke merged 2 commits intocsstools:mainfrom Mar 29, 2025
Merged
rewrite-url docs: Use languageOptions in stylelint config#1587romainmenke merged 2 commits intocsstools:mainfrom
romainmenke merged 2 commits intocsstools:mainfrom
Conversation
* Use languageOptions instead of overriding declaration-property-value-no-unknown rule config * Make syntax consistent with JSON config: Only use double quotes, no trailing commas
Contributor
Author
|
Ah, maybe the preceding text could use an update too, as it currently links to and talks about Also, I wonder if it would make sense to do this: "types": {
"rewrite-url()": "rewrite-url( <string> <url-modifier>* )",
"url": "| <rewrite-url()>"
}It might eventually help configure |
Member
|
Thank you for this @ehoogeveen-medweb 🙇 I think the current change is fine for now :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that Stylelint 16.17.0 is out with support for
declaration-property-value-no-unknowninlanguageOptions, the suggested config forpostcss-rewrite-urlcan be generalized. This commit makes the following changes:languageOptionsinstead of overridingdeclaration-property-value-no-unknownrule configPreview: https://github.com/ehoogeveen-medweb/postcss-plugins/blob/rewrite-url-update-docs/plugins/postcss-rewrite-url/README.md#stylelint
I considered adding a fallback for Stylelint <16.17.0 but given that it's a minor version bump I expect people will update (and if they're looking at
postcss-rewrite-urlfor the first time, they're probably in a good position to updatestylelintanyway).Using the JSON style for the config is a choice I don't feel strongly about - I'm still using it that way in my own projects, but here I just kept it because it seemed consistent with the quoted keys (although the markdown block is technically using language
js).