Enable unicorn/better-regex (#7991)
* Enable `unicorn/better-regex` * Spellcheck ignore regex
This commit is contained in:
1 parent
1221598304
commit
f0207e6850
31 files changed
+60
-57
No files matched your search
@@ -464,7 +464,7 @@ function parseNestedCSS(node, options) {
|
||||
}
|
||||
|
||||
if (name === "at-root") {
|
||||
if (/^\(\s*(without|with)\s*:[\s\S]+\)$/.test(params)) {
|
||||
if (/^\(\s*(without|with)\s*:[\S\s]+\)$/.test(params)) {
|
||||
node.params = parseValue(params);
|
||||
} else {
|
||||
node.selector = parseSelector(params);
|
||||
@@ -500,7 +500,7 @@ function parseNestedCSS(node, options) {
|
||||
].includes(name)
|
||||
) {
|
||||
// Remove unnecessary spaces in SCSS variable arguments
|
||||
params = params.replace(/(\$\S+?)\s+?\.\.\./, "$1...");
|
||||
params = params.replace(/(\$\S+?)\s+?\.{3}/, "$1...");
|
||||
// Remove unnecessary spaces before SCSS control, mixin and function directives
|
||||
params = params.replace(/^(?!if)(\S+)\s+\(/, "$1(");
|
||||
|
||||
|
||||
Reference in new issue
Block a user