-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.js
71 lines (70 loc) · 1.71 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* eslint-disable @stylistic/max-len */
export default {
extends: [
'stylelint-config-standard',
'stylelint-order-htmlacademy',
'@stylistic/stylelint-config',
],
overrides: [
{
customSyntax: 'postcss-scss',
files: ['**/*.scss'],
},
{
customSyntax: 'postcss-html',
files: ['**/*.vue'],
rules: {
'function-no-unknown': [
true,
{ ignoreFunctions: ['v-bind'] },
],
},
},
],
processors: ['@mapbox/stylelint-processor-arbitrary-tags'],
rules: {
'@stylistic/color-hex-case': 'lower',
'@stylistic/indentation': 'tab',
'@stylistic/number-leading-zero': 'always',
'@stylistic/number-no-trailing-zeros': true,
'@stylistic/string-quotes': 'single',
'alpha-value-notation': 'number',
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'content',
'each',
'else',
'forward',
'if',
'include',
'mixin',
'page',
'use',
],
},
],
'color-function-notation': 'legacy',
'color-hex-length': 'long',
'font-family-name-quotes': 'always-unless-keyword',
'media-feature-range-notation': 'prefix',
'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]+)*)*(?:[.+])?$',
{
message: function expected(selectorValue) {
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css. Selector validation tool: https://regexr.com/3apms`;
},
resolveNestedSelectors: true,
},
],
'selector-pseudo-class-no-unknown': [
true,
{ ignorePseudoClasses: ['deep'] },
],
'value-keyword-case': [
'lower',
{ camelCaseSvgKeywords: true },
],
},
};