Skip to content

Commit

Permalink
chore(stylelint): add csstools/use-logical
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Jan 22, 2025
1 parent 9e40282 commit 5869460
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
],
},
],
},
}

0 comments on commit 5869460

Please sign in to comment.