cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 397 forks source link

Stylelint integration #490

Open kof opened 7 years ago

kof commented 7 years ago

Lets try to implement it. We need to find a way to support all interfaces, jss, react-jss, styled-jss, aphrodite-jss. Check out stylelint processors api.

bigslycat commented 7 years ago

May be, eslint plugin? Example:

import jss from 'jss';
jss.createStyleSheet({ ... }).attach();

ESLint checks that jss is imported from node_modules/jss and... But the correctness of CSS properties should be checked with Flow.

kof commented 5 years ago

The latest version of stylelint supports objects syntax now!

SpainTrain commented 4 years ago

The latest version of stylelint supports objects syntax now!

Is this to say it should support JSS linting out of the box, or that it is possible via a custom processor? Thanks!

jackhenry commented 4 years ago

@kof I know this issue is old, but are you happy with the stylelint integration? I've created a jss eslint plugin based on my needs. I would open source it if you think there is any desire/need for it.

SpainTrain commented 4 years ago

@jackhenry Our team has had mixed results using stylelint with JSS (large number of false positives and false negatives). Would love to understand alternatives like your eslint plugin and contribute improvements to one or both projects as we better understand the current issues.

(/CC @bmcniel)

jackhenry commented 4 years ago

@SpainTrain Ok great! I'll work on open sourcing what I have. I'll ping when it's ready.

I also found a small list of desired features to implement from #255.

kof commented 4 years ago

I didn't have time to work on this, so if anyone does it, I am happy.

kelly-tock commented 4 years ago

I think it would be nice to be able to enforce things like alphabetical order at least.