Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Add a lint rule for standalone script interpolation #14

Open
nex3 opened this issue Sep 17, 2018 · 0 comments
Open

Add a lint rule for standalone script interpolation #14

nex3 opened this issue Sep 17, 2018 · 0 comments

Comments

@nex3
Copy link

nex3 commented Sep 17, 2018

Because interpolation is necessary to include SassScript values in many contexts, users sometimes accidentally use it in SassScript expressions themselves. For example, see this line from Angular's Material Design components. Not only is this unnecessary, it coerces the result of the expression to an unquoted string, which may make it fail with further mathematical operations down the line.

There should be a lint for this. Specifically, if an interpolated identifier that's just a single interpolation with no other text is encountered, the linter should suggest the user replace it with the value of the expression.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant