-
Notifications
You must be signed in to change notification settings - Fork 8
/
stylelint.config.js
55 lines (53 loc) · 1.34 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
const BEM_REGEX = new RegExp(
/^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$/,
)
module.exports = {
configBaseDir: path.resolve(__dirname, 'node_modules'),
plugins: ['stylelint-csstree-validator'],
extends: [
'stylelint-config-standard',
'stylelint-config-standard-scss',
'stylelint-config-recess-order',
'stylelint-prettier/recommended',
'stylelint-config-recommended-vue',
],
rules: {
'at-rule-no-unknown': null,
'function-no-unknown': null,
'no-descending-specificity': null,
'no-empty-source': null,
'selector-class-pattern': [
BEM_REGEX,
{
resolveNestedSelectors: true,
message: (error) =>
`"${error}" is not a valid BEM class name (see https://getbem.com/naming/)`,
},
],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep'],
},
],
'scss/at-import-no-partial-leading-underscore': null,
'scss/at-import-partial-extension': null,
'scss/at-rule-no-unknown': true,
'scss/function-no-unknown': true,
'scss/no-duplicate-dollar-variables': true,
'value-keyword-case': [
'lower',
{
camelCaseSvgKeywords: true,
},
],
},
}