drupal-graphql / drupal-decoupled-app

Decoupled Drupal demo application based on React, GraphQL and Apollo including server-side rendering.
MIT License
311 stars 76 forks source link

Switch to stylelint #411

Closed unamaria closed 6 years ago

unamaria commented 6 years ago

Use stylelint instead of CSSLint to avoid errors and enforce consistent conventions in stylesheets.

screen shot 2018-04-30 at 11 25 32 pm

Suggestions:

:)

fubhy commented 6 years ago

Hey Maria! There is no CSS Lint in here. Are you refering to an older version of this maybe?

unamaria commented 6 years ago

Aha! I assumed so because of .csslintrc. In any case, are there any plans to use stylelint? 🙂

fubhy commented 6 years ago

That's due to the version of the Drupal backend we got running in here :). Not my file! I don't have any plans of stylelint in the repo so far. I added prettier which can also be configured for CSS files. I didn't want to add eslint/stylelint, etc. because I didn't want to impose any code style outside of what prettier defaults to. Maybe I would reconsider that. Do you have any compelling arguments for adding it to the starterkit by default?

unamaria commented 6 years ago

Let's try 😄 stylelint (and eslint also?) doesn't have any rules enabled by default. Of course using the standard config would already add opinions, but since they are a) pretty universal and b) rules can be easily disabled it could be considered that adding stylelint promotes healthier code without forcing code style.

fubhy commented 6 years ago

Okay. Let's try it then. We would have to make sure that there are no conflicts with prettier of course. Would you be up for submitting a pull request for that?

unamaria commented 6 years ago

Hey! I took a first stab with #412 :)

fubhy commented 6 years ago

Cool. Thanks! Wondering if we should also add eslint in that case :)

unamaria commented 6 years ago

Yay! Maybe? :) Thank you!