WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 203 forks source link

Integrate Stylelint #472

Open dhruvkb opened 1 year ago

dhruvkb commented 1 year ago

Problem

We have ESLint to lint JS and TS code and Prettier for formatting the files. But we have no linting system set up for CSS files and <style> blocks in Vue SFCs.

Description

Along the same lines as ESLint, we should integrate Stylelint to lint our CSS files and <style> blocks in Vue SFCs. Stylelint can find and flag potential errors, in addition to stylistic choices, and can also autofix in most cases.

Alternatives

Prettier does format the CSS, but it comes in short when it comes to certain rules (example: blank lines between blocks).

Additional context

There is a Nuxt.js module for Stylelint https://github.com/nuxt-community/stylelint-module but I haven't worked out if using the module is in any way better than the default independent setup.

Manishpandey11 commented 1 year ago

Hi, I want to work on this issue. Can you please assign it to me

zackkrida commented 1 year ago

Hi @Manishpandey11 you are welcome to explore this issue. I'll assign you. As @dhruvkb noted in the description, you'll need to check if the nuxt module is in any way better than the default independent setup. Thank you!