chore(stylelint): add `csstools/use-logical`
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
Родитель
9e40282f5c
Коммит
5869460631
|
@ -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',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче