-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.stylelintrc.js
39 lines (38 loc) · 1.2 KB
/
.stylelintrc.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
const sortOrderSmacss = require('stylelint-config-property-sort-order-smacss/generate');
module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-sass-guidelines',
'stylelint-prettier/recommended',
],
plugins: ['stylelint-order'],
rules: {
'number-max-precision': 11,
// for Sass
'function-no-unknown': null,
'selector-anb-no-unmatchable': null,
'at-rule-empty-line-before': null,
// for old Safari
'declaration-block-no-redundant-longhand-properties': [
true,
{ ignoreShorthands: ['inset'] },
],
// Syntax for class selector
// - `.foo` `.fooBarBaz` `.fooBarBaz_hogeFuga`
'selector-class-pattern':
'^(?:[a-z][a-z0-9]*)(?:[A-Z0-9][a-z0-9]*)*(?:_(?:[a-z][a-z0-9]*)(?:[A-Z0-9][a-z0-9]*)*)*$',
'scss/percent-placeholder-pattern':
'^_?(?:[a-z][a-z0-9]*)(?:-[a-z][a-z0-9]*)*$',
'order/properties-alphabetical-order': null,
// Sort props
'order/properties-order': [
{ groupName: 'all', properties: ['all'] },
// SMACSS
...sortOrderSmacss({
emptyLineBefore: 'never',
unspecified: 'bottomAlphabetical',
emptyLineBeforeUnspecified: 'always',
}),
],
},
};