From 5ecac76d322c14ef6ca6888021524e9ef0342cad Mon Sep 17 00:00:00 2001 From: ismay Date: Wed, 18 Sep 2024 10:49:12 +0200 Subject: [PATCH] fix: warn user for unfixable properties --- config/stylelint.config.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config/stylelint.config.js b/config/stylelint.config.js index 614cc0c2..43847e83 100644 --- a/config/stylelint.config.js +++ b/config/stylelint.config.js @@ -4,6 +4,27 @@ module.exports = { ], plugins: ['stylelint-use-logical'], rules: { + /** + * Warn user when properties can't be autofixed: + * https://github.com/csstools/stylelint-use-logical/issues/29 + */ + 'declaration-property-value-disallowed-list': [ + { + 'border-color': [], + 'border-style': [], + 'border-width': [], + inset: [], + margin: [], + padding: [], + 'scroll-margin': [], + 'scroll-padding': [], + }, + { + message: (prop) => + `Use longhand form of ${prop} so that it can be autofixed to logical properties and values`, + severity: 'warning', + }, + ], 'csstools/use-logical': [ true, {