@primer/stylelint-config 13.2.1 → 13.2.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/dist/index.cjs +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +2 -1
- package/plugins/lib/utils.js +4 -3
package/dist/index.cjs
CHANGED
|
@@ -39,11 +39,12 @@ function primitivesVariables(type) {
|
|
|
39
39
|
const data = require$2(`@primer/primitives/dist/styleLint/${file}`);
|
|
40
40
|
|
|
41
41
|
for (const key of Object.keys(data)) {
|
|
42
|
-
const
|
|
43
|
-
const
|
|
42
|
+
const token = data[key];
|
|
43
|
+
const valueProp = '$value' in token ? '$value' : 'value';
|
|
44
|
+
const values = typeof token[valueProp] === 'string' ? [token[valueProp]] : token[valueProp];
|
|
44
45
|
|
|
45
46
|
variables.push({
|
|
46
|
-
name: `--${
|
|
47
|
+
name: `--${token['name']}`,
|
|
47
48
|
values,
|
|
48
49
|
});
|
|
49
50
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -36,11 +36,12 @@ function primitivesVariables(type) {
|
|
|
36
36
|
const data = require$1(`@primer/primitives/dist/styleLint/${file}`);
|
|
37
37
|
|
|
38
38
|
for (const key of Object.keys(data)) {
|
|
39
|
-
const
|
|
40
|
-
const
|
|
39
|
+
const token = data[key];
|
|
40
|
+
const valueProp = '$value' in token ? '$value' : 'value';
|
|
41
|
+
const values = typeof token[valueProp] === 'string' ? [token[valueProp]] : token[valueProp];
|
|
41
42
|
|
|
42
43
|
variables.push({
|
|
43
|
-
name: `--${
|
|
44
|
+
name: `--${token['name']}`,
|
|
44
45
|
values,
|
|
45
46
|
});
|
|
46
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/stylelint-config",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.2",
|
|
4
4
|
"description": "Sharable stylelint config used by GitHub's CSS",
|
|
5
5
|
"author": "GitHub, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@changesets/changelog-github": "^0.5.0",
|
|
59
59
|
"@changesets/cli": "2.27.9",
|
|
60
60
|
"@github/prettier-config": "^0.0.6",
|
|
61
|
+
"@primer/primitives": "^10.0.0-rc.e5d395ea",
|
|
61
62
|
"@rollup/plugin-commonjs": "^28.0.0",
|
|
62
63
|
"@rollup/plugin-json": "^6.1.0",
|
|
63
64
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
package/plugins/lib/utils.js
CHANGED
|
@@ -31,11 +31,12 @@ export function primitivesVariables(type) {
|
|
|
31
31
|
const data = require(`@primer/primitives/dist/styleLint/${file}`)
|
|
32
32
|
|
|
33
33
|
for (const key of Object.keys(data)) {
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const token = data[key]
|
|
35
|
+
const valueProp = '$value' in token ? '$value' : 'value'
|
|
36
|
+
const values = typeof token[valueProp] === 'string' ? [token[valueProp]] : token[valueProp]
|
|
36
37
|
|
|
37
38
|
variables.push({
|
|
38
|
-
name: `--${
|
|
39
|
+
name: `--${token['name']}`,
|
|
39
40
|
values,
|
|
40
41
|
})
|
|
41
42
|
}
|