1

A code snippet dealing with the scenario:

$unfolded-transitions: () !default;
@each $transition in $transitions {
    $unfolded-transitions: append($unfolded-transitions, unfoldTransition($transition), comma); /* stylelint-disable-line scss/no-duplicate-dollar-variables */
}

Here I have explicitly used stylelint-disable-line comment to skip the rule. Is it possible to tell stylelint to skip the 'no-duplicate-dollar-variables' rule when a variable is initialized with default as in the case above. In case if a value is assigned to a variable, then stylelint should report the required warning if there are duplicates.

Ankit Koirala
  • 354
  • 3
  • 13

1 Answers1

0

Is it possible to tell stylelint to skip the 'no-duplicate-dollar-variables' rule when a variable is initialized with default as in the case above

It is not possible but it should be.

I recommend you create a new issue in the stylelint-scss tracker and suggest that the no-duplicate-dollar-variables rule takes into account !default variables.

jeddy3
  • 3,451
  • 1
  • 12
  • 21