chore: add baseline stylelint rules#6372
Conversation
Use the Prettier config so not to conflict with rules. Add the Stylelint baseline recommended rules to catch additional lissues
|
✔️ [V2] 🔨 Explore the source changes: 3717525 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61e371c1d0551000075068b7 😎 Browse the preview: https://deploy-preview-6372--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6372--docusaurus-2.netlify.app/ |
Josh-Cena
left a comment
There was a problem hiding this comment.
Okay, LGTM!
I'll figure out two things myself in subsequent PRs:
- How to enable the standard config
- How to make our copyright rule stricter & fixable
But this PR is ready. Thank you!
|
Does it make sense to ignore those patterns as well? My IDE is complaining now ;) |
|
That's very weird... I didn't get it for myself. Is that from lint-staged or the |
|
What about excluding everything we want to skip instead of using a pattern in the CLI command? IDEs don't see this *.css filter, and this leads to this annoying banner |
|
Oh... I've always just run About your editor applying stylelint to unrelated files though, that looks very suspicious. My stylelint extension in vscode doens't do that... |
|
Playing around with adding to the styllintignore, but it does seem like stylelint is just a little broken for it's default file globs |
It's not me, it's my IDE :D And I think it's perfectly legit for stylelint to lint css-in-js or md It doesn't seem to expand to all files (not package.json for example) so maybe we could just ignore a list of extensions for now? |
|
Yeah, that would work. |
|
Opened #6476 that might resolve that |

Motivation
Use the Prettier config so not to conflict with rules.
Add the Stylelint baseline recommended rules to catch additional lissues. Fixed the straight forward issues and disabled the others.
Tried with https://github.com/stylelint/stylelint-config-standard but it created much more change, so left it with the lighter baseline config
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
N/A
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)