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, {