scss-lint icon indicating copy to clipboard operation
scss-lint copied to clipboard

Allow unknown property names in `:export` block

Open jkjustjoshing opened this issue 7 years ago • 1 comments

I'm using CSS Modules with SCSS (via https://gatsbyjs.org). I'm using the CSS Modules :export feature to send my SCSS variables to Javascript:

:export {
    headerHeight: $header-height;
}

When I do this, I get a scss-lint error "Unknown property: 'headerHeight'".

I'd like the ability with scss-lint to use arbitrary property names within an :export block (possibly behind a rule toggle).

jkjustjoshing avatar Oct 17 '18 14:10 jkjustjoshing

My current workaround is doing

:export {
    #{'headerHeight'}: $header-height;
}

but it's pretty ugly just to get around the linter rule.

jkjustjoshing avatar Oct 17 '18 14:10 jkjustjoshing