Veey
Veey

Reputation: 246

how to validate / lint styled-jsx in NextJS?

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>

Upvotes: 1

Views: 673

Answers (0)

Related Questions