Skip to content

Commit

Permalink
Update lib/rules/function-calc-no-unspaced-operator/index.js
Browse files Browse the repository at this point in the history
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
  • Loading branch information
romainmenke and ybiquitous committed Jun 17, 2023
1 parent 815fa94 commit a6a8050
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/rules/function-calc-no-unspaced-operator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ const rule = (primary, _secondaryOptions, context) => {
}

root.walkDecls((decl) => {
if (!OPERATOR_REGEX.test(getDeclarationValue(decl))) return;
const value = getDeclarationValue(decl);

if (!OPERATOR_REGEX.test(value)) return;

let needsFix = false;
const valueIndex = declarationValueIndex(decl);
const parsedValue = valueParser(getDeclarationValue(decl));
const parsedValue = valueParser(value);

/**
* @param {import('postcss-value-parser').Node} operatorNode
Expand Down

0 comments on commit a6a8050

Please sign in to comment.