docs: use Stylelint setup wizard and stylelint.config.mjs - #53
Open
SimonVanherweghe wants to merge 1 commit into
Open
SimonVanherweghe wants to merge 1 commit into
SimonVanherweghe wants to merge 1 commit into
Conversation
The page said Stylelint has no setup wizard and that you have to create .stylelintrc.json yourself. Stylelint now ships `npm create stylelint@latest`, which writes stylelint.config.mjs and installs stylelint and stylelint-config-standard. Mention that .stylelintrc.json still works for older projects, and fix "build in" -> "built-in". Verified against create-stylelint 1.0.1, stylelint 17.16.0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
code quality/03-stylelint.mdwas out of date with the current Stylelint get-started guide:npm create stylelint@latest..stylelintrc.jsonthemselves. The wizard and the docs now usestylelint.config.mjs.What changed
npm create stylelint@latest, with a short description of what it does and the config file it writes..stylelintrc.jsonstill works, for students who meet it in older projects.The Run and VS Code sections are otherwise unchanged.
Verified
I tested this in a fresh
npm create vite@latestvanilla project on Node 24.18.0 and npm 11.16.0.Ok to proceed? (y)to installcreate-stylelint@1.0.1. The wizard then shows a summary of what it will do and asks one question,Continue?, which defaults to Yes.stylelint.config.mjswith exactly the content shown on the page, and installedstylelint17.16.0 andstylelint-config-standard40.0.0.npx stylelint "**/*.css"lintedsrc/and skippednode_modules.stylelint.config.mjsreplaced by an equivalent.stylelintrc.json, Stylelint reported the same problems.npm run buildpasses.🤖 Generated with Claude Code