-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathstylelint.config.js
43 lines (41 loc) · 1019 Bytes
/
stylelint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: CC0-1.0
*/
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
'selector-pseudo-class-no-unknown': [
true,
{
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',
],
},
],
},
}