问题
I am using nextJS for development, for stylelint to validate my .scss
and .css
files.
I'm also using styled-jsx
or css-in-js
for component level styling (it's kind of requirement) and want to know if there's some library to validate styled-jsx
below is the code sample of my css code.
<style jsx>{`
.HeadText {
color: ${myColors['color-primary']};
}
`}
</style>
I've tried using this library but it work's for only static styles like below :
<style jsx>{`
.HeadText {
color: red;
bad-property: something; // gives error
}
`}
</style>
来源:https://stackoverflow.com/questions/59998892/how-to-validate-lint-styled-jsx-in-nextjs