@primer/stylelint-config 12.7.1-rc.1402572 → 12.7.1-rc.410391d
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/plugins/no-deprecated-colors.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
- [#333](https://github.com/primer/stylelint-config/pull/333) [`485ce04`](https://github.com/primer/stylelint-config/commit/485ce047d75a635134919678a776ea808604cf4a) Thanks [@langermank](https://github.com/langermank)! - Adding more color replacements for deprecated colors
|
|
16
16
|
|
|
17
|
+
- [#340](https://github.com/primer/stylelint-config/pull/340) [`4688bb4`](https://github.com/primer/stylelint-config/commit/4688bb4c0ea7975672b76af8706b80278f00f1a4) Thanks [@langermank](https://github.com/langermank)! - add inlineFallback prop to no-deprecated-colors
|
|
18
|
+
|
|
17
19
|
- [#322](https://github.com/primer/stylelint-config/pull/322) [`726d7d1`](https://github.com/primer/stylelint-config/commit/726d7d1bf4eac82a032c448cb0be32d5bf66b29a) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating no-deprecated-colors for primitives v8
|
|
18
20
|
|
|
19
21
|
- [#334](https://github.com/primer/stylelint-config/pull/334) [`b14c154`](https://github.com/primer/stylelint-config/commit/b14c154174ddd7190e62fe1d26698fc9cfe75c17) Thanks [@langermank](https://github.com/langermank)! - More tests for `no-deprecated-colors`
|
package/package.json
CHANGED
|
@@ -20,6 +20,8 @@ const replacedVars = {}
|
|
|
20
20
|
const newVars = {}
|
|
21
21
|
|
|
22
22
|
module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, context) => {
|
|
23
|
+
const {inlineFallback = false} = options
|
|
24
|
+
|
|
23
25
|
if (!enabled) {
|
|
24
26
|
return noop
|
|
25
27
|
}
|
|
@@ -67,7 +69,7 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
if (context.fix && replacement !== null) {
|
|
70
|
-
replacement = `${replacement}`
|
|
72
|
+
replacement = `${replacement}${inlineFallback ? `, var(${variableName})` : ''}`
|
|
71
73
|
replacedVars[variableName] = true
|
|
72
74
|
newVars[replacement] = true
|
|
73
75
|
if (node.type === 'atrule') {
|