amilajack / eslint-plugin-compat

Check the browser compatibility of your code
MIT License
3.07k stars 104 forks source link

Idea: compatibility linting for css properties in 'css-in-js' libraries #215

Open amilajack opened 5 years ago

amilajack commented 5 years ago

One of the benefits of css-in-js is being able to leverage JS tooling. With this in mind, it makes sense to lint css-in-js with this plugin:

Idea

This is an example of linting styled-components with this plugin.

const Button = styled.a`
  backdrop-filter: blur(10px);
`

Errors:

'backdrop-filter' is not supported in Firefox 56
Semigradsky commented 3 years ago

I advice to remain this for stylelint - https://github.com/ismay/stylelint-no-unsupported-browser-features