From 2f89665ab75b8bae43dd3af318798b5232a1c848 Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Fri, 28 Mar 2025 14:31:26 +0100 Subject: [PATCH] update rewrite-url docs for stylelint config * 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 --- plugins/postcss-rewrite-url/README.md | 21 +++++++++++---------- plugins/postcss-rewrite-url/docs/README.md | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/plugins/postcss-rewrite-url/README.md b/plugins/postcss-rewrite-url/README.md index 466fd7848..fe15bf8d4 100644 --- a/plugins/postcss-rewrite-url/README.md +++ b/plugins/postcss-rewrite-url/README.md @@ -142,20 +142,21 @@ Stylelint is able to check for unknown property values. Setting the correct configuration for this rule makes it possible to check even non-standard syntax. ```js - 'declaration-property-value-no-unknown': [ - true, - { - "typesSyntax": { - "url": "| rewrite-url( * )" - } - }, - ], - 'function-no-unknown': [ +"languageOptions": { + "syntax": { + "types": { + "url": "| rewrite-url( * )" + } + } +}, +"rules": { + "function-no-unknown": [ true, { "ignoreFunctions": ["rewrite-url"] } - ], + ] +} ``` [cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test diff --git a/plugins/postcss-rewrite-url/docs/README.md b/plugins/postcss-rewrite-url/docs/README.md index 63f61c8be..02ad0ba0a 100644 --- a/plugins/postcss-rewrite-url/docs/README.md +++ b/plugins/postcss-rewrite-url/docs/README.md @@ -109,20 +109,21 @@ Stylelint is able to check for unknown property values. Setting the correct configuration for this rule makes it possible to check even non-standard syntax. ```js - 'declaration-property-value-no-unknown': [ - true, - { - "typesSyntax": { - "url": "| rewrite-url( * )" - } - }, - ], - 'function-no-unknown': [ +"languageOptions": { + "syntax": { + "types": { + "url": "| rewrite-url( * )" + } + } +}, +"rules": { + "function-no-unknown": [ true, { "ignoreFunctions": ["rewrite-url"] } - ], + ] +} ```