@d-zero/stylelint-config 5.1.0 → 6.0.0-alpha.2
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/name.js +7 -3
- package/package.json +3 -3
package/name.js
CHANGED
|
@@ -3,7 +3,7 @@ module.exports = {
|
|
|
3
3
|
'custom-media-pattern': '[a-z][a-z-]*',
|
|
4
4
|
'custom-property-pattern': '[a-z][a-z-]*',
|
|
5
5
|
'selector-class-pattern': [
|
|
6
|
-
'^
|
|
6
|
+
'^[lpc]-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$',
|
|
7
7
|
{
|
|
8
8
|
resolveNestedSelectors: true,
|
|
9
9
|
/**
|
|
@@ -11,8 +11,12 @@ module.exports = {
|
|
|
11
11
|
* @returns {string}
|
|
12
12
|
*/
|
|
13
13
|
message: (selector) => {
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (
|
|
15
|
+
!selector.startsWith('.c-') &&
|
|
16
|
+
!selector.startsWith('.l-') &&
|
|
17
|
+
!selector.startsWith('.p-')
|
|
18
|
+
) {
|
|
19
|
+
return `クラス名は「l-」「p-」「c-」のいずれかから始めてください: ${selector}`;
|
|
16
20
|
}
|
|
17
21
|
if (selector.split('__').length > 2) {
|
|
18
22
|
return `「__」はコンポーネント名とエレメント名の区切りを表します。エレメント名の文字区切りは「-」を使います: ${selector}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/stylelint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.2",
|
|
4
4
|
"description": "Configurations of Stylelint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@d-zero/stylelint-rules": "
|
|
32
|
+
"@d-zero/stylelint-rules": "6.0.0-alpha.2",
|
|
33
33
|
"postcss-scss": "4.0.9",
|
|
34
34
|
"stylelint": "17.4.0",
|
|
35
35
|
"stylelint-config-recess-order": "7.6.1",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"stylelint-scss": "7.0.0",
|
|
39
39
|
"stylelint-use-logical": "2.1.3"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b2d753122349a8d4dd4b7d484276d03fec498f0d"
|
|
42
42
|
}
|