Skip to content

Commit 7b6f53f

Browse files
committed
ci(stylelint): Also commit config
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent f3a01b7 commit 7b6f53f

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

stylelint.config.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
const stylelintConfig = require('@nextcloud/stylelint-config')
6+
7+
stylelintConfig.rules['at-rule-no-unknown'] = [
8+
true,
9+
{
10+
ignoreAtRules: ['include', 'mixin', 'use', 'for'],
11+
},
12+
]
13+
14+
if (!stylelintConfig.plugins) {
15+
stylelintConfig.plugins = []
16+
}
17+
18+
stylelintConfig.plugins.push('stylelint-use-logical')
19+
stylelintConfig.rules['csstools/use-logical'] = [
20+
'always',
21+
{
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+
41+
module.exports = stylelintConfig

0 commit comments

Comments
 (0)