Skip to content

Commit 59e29ca

Browse files
authored
Merge pull request #14257 from nextcloud/backport/14169/stable31
2 parents d9f0bb6 + c50ad6f commit 59e29ca

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"jest-transform-stub": "^2.0.0",
104104
"openapi-typescript": "^7.5.2",
105105
"regenerator-runtime": "^0.14.1",
106+
"stylelint-use-logical": "^2.1.2",
106107
"ts-jest": "^29.2.5",
107108
"vue-template-compiler": "^2.7.16",
108109
"wasm-check": "^2.1.2",

stylelint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,32 @@ stylelintConfig.rules['at-rule-no-unknown'] = [
1010
},
1111
]
1212

13+
if (!stylelintConfig.plugins) {
14+
stylelintConfig.plugins = []
15+
}
16+
17+
stylelintConfig.plugins.push('stylelint-use-logical')
18+
stylelintConfig.rules['csstools/use-logical'] = [
19+
'always',
20+
{
21+
severity: 'warning',
22+
// Only lint LTR-RTL properties for now
23+
except: [
24+
// Position properties
25+
'top',
26+
'bottom',
27+
// Position properties with directional suffixes
28+
/-top$/,
29+
/-bottom$/,
30+
// Size properties
31+
'width',
32+
'max-width',
33+
'min-width',
34+
'height',
35+
'max-height',
36+
'min-height',
37+
],
38+
},
39+
]
40+
1341
module.exports = stylelintConfig

0 commit comments

Comments
 (0)