diff --git a/stylelint.config.js b/stylelint.config.js index e6cf713ef0..39c866502a 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -7,6 +7,7 @@ const stylelintConfig = require('@nextcloud/stylelint-config') module.exports = { extends: ['@nextcloud/stylelint-config'], + plugins: ['stylelint-use-logical'], rules: { // For CSS Modules // If there will be more rules for CSS Modules - consider extending stylelint-config-css-modules @@ -16,5 +17,27 @@ module.exports = { ignorePseudoClasses: [...stylelintConfig.rules['selector-pseudo-class-no-unknown'][1].ignorePseudoClasses, 'global'], }, ], + 'csstools/use-logical': [ + 'always', + { + severity: 'warning', + // Only lint LTR-RTL properties for now + except: [ + // Position properties + 'top', + 'bottom', + // Position properties with directional suffixes + /-top$/, + /-bottom$/, + // Size properties + 'width', + 'max-width', + 'min-width', + 'height', + 'max-height', + 'min-height', + ], + }, + ], }, }