-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.js
27 lines (27 loc) · 971 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
module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-recess-order',
'stylelint-prettier/recommended',
],
plugins: ['stylelint-selector-bem-pattern'],
rules: {
// Should be disabled or configured like this to work with `selector-bem-pattern`
// Borrowed from https://github.com/btd1337/stylelint-config-sass-guidelines/blob/master/.stylelintrc
'selector-class-pattern':
'^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:\\[.+\\])?$',
'plugin/selector-bem-pattern': {
preset: 'suit',
componentName: '[a-z]+',
componentSelectors: {
initial: '^\\.{componentName}(?:-[a-z]+)?$',
combined: '^\\.combined-{componentName}-[a-z]+$',
},
utilitySelectors: '^\\.util-[a-z]+$',
},
'function-no-unknown': [
true,
{ ignoreFunctions: ['theme'] },
],
},
};