@oroinc/oro-stylelint-config 5.1.0-alpha1 → 5.1.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +28 -0
- package/package.json +9 -4
package/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
/* eslint-disable quote-props */
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
'plugins': ['stylelint-scss', 'stylelint-declaration-strict-value'],
|
|
5
6
|
'extends': ['stylelint-config-standard'],
|
|
7
|
+
'customSyntax': 'postcss-scss',
|
|
6
8
|
'rules': {
|
|
7
9
|
'at-rule-empty-line-before': [
|
|
8
10
|
'always',
|
|
@@ -54,6 +56,13 @@ module.exports = {
|
|
|
54
56
|
'comment-word-disallowed-list': [
|
|
55
57
|
'/todo/i'
|
|
56
58
|
],
|
|
59
|
+
'custom-property-pattern': [
|
|
60
|
+
'^([\\#\\{\\$]*[a-z][a-z0-9\\}]*)(-[\\#\\$\\{a-z0-9\\}]+)*$',
|
|
61
|
+
{
|
|
62
|
+
message: 'Expected custom property name to be kebab-case',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'declaration-block-no-redundant-longhand-properties': null,
|
|
57
66
|
'declaration-block-no-shorthand-property-overrides': null,
|
|
58
67
|
'declaration-empty-line-before': [
|
|
59
68
|
'always',
|
|
@@ -116,6 +125,24 @@ module.exports = {
|
|
|
116
125
|
'selector-max-compound-selectors': 4,
|
|
117
126
|
'selector-max-id': 1,
|
|
118
127
|
'selector-no-vendor-prefix': true,
|
|
128
|
+
'selector-class-pattern': [
|
|
129
|
+
'^([a-z][a-zA-Z0-9]*)([-_]*[a-zA-Z0-9]+)*$',
|
|
130
|
+
{
|
|
131
|
+
message: 'Selector can contain only hyphens or underscores for word separators (selector-name, selector-name__element)',
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
'selector-id-pattern': [
|
|
135
|
+
'^([a-z][a-z0-9]*)([-_]?[a-z0-9]+)*$',
|
|
136
|
+
{
|
|
137
|
+
message: 'Id should be written in lowercase with hyphens or underscores (id-name, id_name)',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
'keyframes-name-pattern': [
|
|
141
|
+
'^([\\#\\{\\$]*[a-z][a-z0-9\\}]*)(-[\\#\\$\\{a-z0-9\\}]+)*$',
|
|
142
|
+
{
|
|
143
|
+
message: 'Expected keyframe name to be kebab-case',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
119
146
|
'shorthand-property-no-redundant-values': true,
|
|
120
147
|
'string-quotes': 'single',
|
|
121
148
|
'value-no-vendor-prefix': [
|
|
@@ -180,6 +207,7 @@ module.exports = {
|
|
|
180
207
|
// ignore: url($path);
|
|
181
208
|
'/\\$[_]?[a-z]+([a-z0-9-]+[a-z0-9]+)/i'
|
|
182
209
|
],
|
|
210
|
+
// eslint-disable-next-line max-len
|
|
183
211
|
'message': 'The "${value}" of "${property}" has to be a variable on declaration in scss $variable or css var(--variable)'
|
|
184
212
|
}
|
|
185
213
|
]
|
package/package.json
CHANGED
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
"name": "@oroinc/oro-stylelint-config",
|
|
3
3
|
"author": "Oro, Inc (https://www.oroinc.com)",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "5.1.0-
|
|
5
|
+
"version": "5.1.0-alpha2",
|
|
6
6
|
"description": "Stylelint config used by ORO",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"index.js"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"stylelint
|
|
13
|
-
"stylelint-
|
|
14
|
-
"stylelint-
|
|
12
|
+
"stylelint": "^14.3.0",
|
|
13
|
+
"stylelint-config-standard": "^24.0.0",
|
|
14
|
+
"stylelint-declaration-strict-value": "^1.8.0",
|
|
15
|
+
"stylelint-scss": "^4.0.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"postcss": "^8.4.6",
|
|
19
|
+
"postcss-scss": "^4.0.3"
|
|
15
20
|
}
|
|
16
21
|
}
|