chore: fix Stylelint globs for editor support#6476
Conversation
| "stylelint --allow-empty-input --fix" | ||
| ], | ||
| "*": [ | ||
| "stylelint --allow-empty-input --fix", |
There was a problem hiding this comment.
I'm still skeptical about using stylelint to fix non-CSS code though, don't like any of the diff in the MD files.
There was a problem hiding this comment.
what do you dislike?
I don't have a strong opinion on this but we already use similar rgb strings in our theme CSS files
.copyButton {
background: rgb(0 0 0 / 30%);
}There was a problem hiding this comment.
Fair enough, I just feel like what we present to the user doesn't necessarily have to follow our internal code style, but rather what's most popular (and I guess the legacy function style is still more widely recognized)... I'm fine with both.
There was a problem hiding this comment.
I agree on that, and also found this syntax less popular
maybe we should just change the rules, so that the most popular syntax also applied to our theme (hence swizzling too)
There was a problem hiding this comment.
But I do like the modern syntax better :P Don't really want to tweak our code style, just want to enforce control over our text content. ESLint doesn't enforce anything on Markdown code blocks.
There was a problem hiding this comment.
I'm fine if we disable this on all md files or just this specific rule, that doesn't seem to have a huge impact anyway
There was a problem hiding this comment.
Yeah, I don't really want to use it to lint anything other than CSS. We have Prettier to format the inline code anyways.
|
The build error is interesting, since it looks like there is a transitive dependency that needs to be pinned. I tried updating the remark plug-ins in the migrate package, but there is still a build issue |
|
This seems to be because an alternative version of |
|
Oops, it's because of the wrong unified version being hoisted 😅 Problem is this: |
|
Reverted the stylelint bump in the Facebook template. We'll figure that out later... |
|
✔️ [V2] 🔨 Explore the source changes: 5c7518a 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61f3689494809c0007953e43 😎 Browse the preview: https://deploy-preview-6476--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6476--docusaurus-2.netlify.app/ |
Motivation
Stylelint will try to run on other files in IDEs. This expands out the globing from the CLI to include all files, by updating the ignores to just the files that are impacted. Added the parsers for HTML and MD files, but left the others like TS(X) since I don't think there is CSS in JS used here
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
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.)