@itcase/config 1.6.70 → 1.6.71
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/package.json
CHANGED
package/postcss/require.js
CHANGED
|
@@ -48,6 +48,7 @@ module.exports = {
|
|
|
48
48
|
}),
|
|
49
49
|
require('postcss-mixins'),
|
|
50
50
|
require('postcss-nested-ancestors'),
|
|
51
|
+
require('./silenceNestedAncestorsMultiPlaceholder.cjs'),
|
|
51
52
|
postcssNested,
|
|
52
53
|
require('postcss-hexrgba'),
|
|
53
54
|
require('postcss-easings'),
|
|
@@ -75,6 +76,7 @@ module.exports = {
|
|
|
75
76
|
require('postcss-import'),
|
|
76
77
|
require('postcss-each'),
|
|
77
78
|
require('postcss-nested-ancestors'),
|
|
79
|
+
require('./silenceNestedAncestorsMultiPlaceholder.cjs'),
|
|
78
80
|
postcssNested,
|
|
79
81
|
require('postcss-combine-duplicated-selectors'),
|
|
80
82
|
require('postcss-discard-duplicates'),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* postcss-nested-ancestors warns when a selector has more than one ancestor
|
|
3
|
+
* placeholder (e.g. ^^& ... ^^&). Some BEM selectors trigger this spuriously;
|
|
4
|
+
* drop that specific warning so Storybook/Vite builds stay clean.
|
|
5
|
+
*/
|
|
6
|
+
module.exports = () => {
|
|
7
|
+
return {
|
|
8
|
+
postcssPlugin: 'silence-nested-ancestors-multi-placeholder',
|
|
9
|
+
OnceExit(root, { result }) {
|
|
10
|
+
result.messages = result.messages.filter((message) => {
|
|
11
|
+
if (message.type !== 'warning') {
|
|
12
|
+
return true
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return !String(message.text).includes(
|
|
16
|
+
'More then one ancestor placeholders found in same selector',
|
|
17
|
+
)
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports.postcss = true
|