first commit
This commit is contained in:
28
node_modules/stylelint/lib/utils/isStandardSyntaxFunction.mjs
generated
vendored
Normal file
28
node_modules/stylelint/lib/utils/isStandardSyntaxFunction.mjs
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Check whether a function is standard
|
||||
*
|
||||
* @param {import('postcss-value-parser').Node} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export default function isStandardSyntaxFunction(node) {
|
||||
// Function nodes without names are things in parentheses like Sass lists
|
||||
if (!node.value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (node.value.startsWith('#{')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// CSS-in-JS interpolation
|
||||
if (node.value.startsWith('${')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// CSS-in-JS syntax
|
||||
if (node.value.startsWith('`')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user