I am trying to finish setting up Stencil for BigCommerce. After updating all dependencies, and running the sass-migrator division all issues have been resolved except for one file.
The problem code is the line beginning $value: math.div.
// Rem Calculations
// -----------------------------------------------------------------------------
@function stripUnit($num) {
@return math.div($num, ($num * 0 + 1));
}
// scss-lint:disable ZeroUnit
@function convertToRem($value, $base-value: $fontSize-base) {
$value: math.div(stripUnit($value), stripUnit($base-value)) * 1rem;
@if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
@return $value;
}
That looks to me as if the variable $value is calling itself in the calculation!
the error produced by this is as follows.
Invalid CSS after "... @return math": expected expression (e.g. 1px, bold), was ".div($num, ($num * "
on line 29 of ../../node_modules/@bigcommerce/citadel/dist/tools/toolkit.scss
from line 13 of stdin
>> @return math.div($num, ($num * 0 + 1));
This issue showed up on other files but the sass-migrator fixed them.