Skip to content

feat(stylelint-config)!: require Stylelint 17 and update the lint/stylelint scaffold - #109

Merged
Adi-ty merged 5 commits into
mainfrom
feat/stylelint-config-stylelint-17
Nov 24, 2026
Merged

Adi-ty merged 5 commits into
mainfrom
feat/stylelint-config-stylelint-17

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Releases @rtcamp/stylelint-config 2.0.0, which requires Stylelint 17. 1.x asks for Stylelint 16 and @wordpress/stylelint-config 23, so next to @wordpress/scripts 35 or later npm either installs a second, older Stylelint set (without legacy-peer-deps) or reports all three peers as invalid (with it).

Changes

  • Peers: @wordpress/stylelint-config ^25.0.0 || ^26.0.0 || ^27.0.0, stylelint ^17.14.1, stylelint-scss ^7.2.0. index.js is unchanged.
  • engines.node is >=22.23.4, the version in .nvmrc and the CI matrix since fix: move Node.js to a release patched for CVE-2026-111497 #101.
  • Tests lint real CSS and SCSS through the Stylelint CLI (Stylelint 17 is ESM-only, so Jest can't import it).
  • README: projects on @wordpress/scripts 35+ install the config on its own and reuse the Stylelint set scripts brings; other projects install the three peers too. Upgrading from 1.x runs the same install; if npm reports ERESOLVE, uninstall 1.x (plus any Stylelint 16 peers package.json lists) and install again.
  • Version 2.0.0 and its CHANGELOG heading; merging this publishes it.
  • lint/stylelint scaffold installs @rtcamp/stylelint-config ^2.0.0 with stylelint ^17.14.1, @wordpress/stylelint-config ^27.0.0 and stylelint-scss ^7.2.0, the versions @wordpress/scripts 37 depends on.

How I verified

npm run check
cd node-packages/stylelint-config && npm pack --dry-run   # LICENSE, README.md, index.js, package.json

Config-only install of the packed tarball in fresh @wordpress/scripts 35.0.0, 36.1.0 and 37.2.0 projects: adds one package, reuses scripts' @wordpress/stylelint-config (25.0.0, 26.1.0, 27.2.0), and wp-scripts lint-style reports block-no-empty and scss/at-extend-no-missing-placeholder.

Upgrade from 1.1.0 with the packed tarball:

Project Install over 1.x After npm uninstall
Plugin with legacy-peer-deps works —
Theme where npm added 1.x's peers ERESOLVE works after uninstalling @rtcamp/stylelint-config
Project listing the Stylelint 16 peers ERESOLVE works after uninstalling the config and those three peers; uninstalling only the config still fails

No Stylelint 16 packages are left afterwards. The theme and plugin lint:css output is unchanged, and the theme's npm ls vite no longer reports Vite 8 as invalid against @wordpress/theme 0.17.0.

Scaffold, in a fresh @wordpress/scripts 37.2.0 project with the packed tarball standing in for @rtcamp/stylelint-config@^2.0.0:

node /path/to/wp-tooling/node-packages/wp-tooling/bin/wp-tooling.js add lint/stylelint --non-interactive --cwd .
# run the printed npm install commands and add the printed lint:css scripts
mkdir -p assets/css assets/scss
printf 'a {}\n' > assets/css/style.css
printf 'a {\n\t@extend .button;\n}\n' > assets/scss/style.scss
npm run lint:css                                   # block-no-empty, scss/at-extend-no-missing-placeholder
npx wp-scripts lint-style 'assets/**/*.{css,scss}' # same two problems

The install leaves one Stylelint 17 set, shared with @wordpress/scripts.

Match the Stylelint 17 set that @wordpress/scripts 35 to 37 depend on.

- Peers: @wordpress/stylelint-config ^25 || ^26 || ^27, stylelint ^17.14.1, stylelint-scss ^7.2.0.
- Tests lint real CSS and SCSS through the Stylelint CLI.
- README: config-only install with @wordpress/scripts 35+, four-package install without it, and the 1.x upgrade.
- Version 2.0.0 with its CHANGELOG heading.

BREAKING CHANGE: Stylelint 16 and @wordpress/stylelint-config 23 and 24 are no longer supported. If installing 2.0.0 reports ERESOLVE, uninstall 1.x, plus any Stylelint 16 peers package.json lists, and install again.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@justlevine justlevine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW AI is generating docslop because we have already committed docslop here so it think that's part of the design decision. Once this whole repo is manually deslopped it will be easier, but for now we should try to be vigilant before committing any more.

(You can try adding an antislop step to your review loop).

Actual code change lgtm, once the package-lock.json is fixed feel free to ping me again to approve and squash.

@Adi-ty
Adi-ty requested review from justlevine and a balanced review from Copilot November 24, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@Adi-ty

Adi-ty commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @justlevine all three review points are fixed comments and docs trimmed, upgrade notes moved to the changelog. Merged main and regenerated the lock, tests pass. Ready for re-approval.

@Adi-ty
Adi-ty merged commit c389109 into main Nov 24, 2026
12 checks passed
@Adi-ty
Adi-ty deleted the feat/stylelint-config-stylelint-17 branch November 24, 2026 09:56
github-actions Bot pushed a commit that referenced this pull request Nov 24, 2026
…lelint scaffold (#109)

* feat(stylelint-config)!: require Stylelint 17

Match the Stylelint 17 set that @wordpress/scripts 35 to 37 depend on.

- Peers: @wordpress/stylelint-config ^25 || ^26 || ^27, stylelint ^17.14.1, stylelint-scss ^7.2.0.
- Tests lint real CSS and SCSS through the Stylelint CLI.
- README: config-only install with @wordpress/scripts 35+, four-package install without it, and the 1.x upgrade.
- Version 2.0.0 with its CHANGELOG heading.

BREAKING CHANGE: Stylelint 16 and @wordpress/stylelint-config 23 and 24 are no longer supported. If installing 2.0.0 reports ERESOLVE, uninstall 1.x, plus any Stylelint 16 peers package.json lists, and install again.

* chore(wp-tooling): move the Stylelint scaffold to @rtcamp/stylelint-config 2

* chore(stylelint-config): require Node.js 22.23.4

* docs(stylelint-config): apply review suggestions
github-actions Bot pushed a commit that referenced this pull request Nov 24, 2026
…lelint scaffold (#109)

* feat(stylelint-config)!: require Stylelint 17

Match the Stylelint 17 set that @wordpress/scripts 35 to 37 depend on.

- Peers: @wordpress/stylelint-config ^25 || ^26 || ^27, stylelint ^17.14.1, stylelint-scss ^7.2.0.
- Tests lint real CSS and SCSS through the Stylelint CLI.
- README: config-only install with @wordpress/scripts 35+, four-package install without it, and the 1.x upgrade.
- Version 2.0.0 with its CHANGELOG heading.

BREAKING CHANGE: Stylelint 16 and @wordpress/stylelint-config 23 and 24 are no longer supported. If installing 2.0.0 reports ERESOLVE, uninstall 1.x, plus any Stylelint 16 peers package.json lists, and install again.

* chore(wp-tooling): move the Stylelint scaffold to @rtcamp/stylelint-config 2

* chore(stylelint-config): require Node.js 22.23.4

* docs(stylelint-config): apply review suggestions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants