Closed justinryder closed 4 years ago
@nex3: What would be the better style for migrating these cases?
With parentheses around the namespaced variable or with a space after the -
?
We could consider parsing initial hyphens before IDENTIFIER "."
as negations—it requires some amount of lookahead in the parser, but that's par for the course in Sass :laughing:. I'll add it to the design meeting agenda.
For now, it's probably best to just generate parentheses here.
Reduced Test Case
Given the following files:
_variables.scss
:styles.scss
:Run the following command (sass-migrator@1.0.0):
sass-migrator module styles.scss
Actual Results
The resulting
styles.scss
throws a compilation error where the module is used.Compilation error (sass@1.23.0):
Expected Results
styles.scss
should be migrated with no compilation errors.Possible valid target output (this compiles successfully with sass@1.23.0):