Skip to content

fix: support stylelint 18 - #402

Merged
alexander-akait merged 1 commit into
mainfrom
fix/stylelint-18
Nov 16, 2026
Merged

alexander-akait merged 1 commit into
mainfrom
fix/stylelint-18

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #401. The optional stylelint peer range excluded Stylelint 18, so npm ls reported it as invalid.

 "devDependencies": {
-  "stylelint": "^17.15.0",
+  "stylelint": "^18.0.0",
 },
 "peerDependencies": {
-  "stylelint": "^17.0.0",
+  "stylelint": "^17.0.0 || ^18.0.0",
 }
  • The lockfile only removes packages: Stylelint 18 dropped dependencies such as table, meow and globby.
  • The README requirements line now reads "Stylelint 17 or 18".
  • Stylelint 18 needs Node ^22.22.2 || ^24.15.0 || >=26. The plugin's engines (>= 22.12.0) is unchanged: the stricter range applies only to users who choose Stylelint 18.

What kind of change does this PR introduce?

fix

Did you add tests for your changes?

No new tests: the existing stylelint suites now run against stylelint@18.0.0 and all pass. Locally 371/372 tests pass. The one failure, test/typed-results.test.js:179 (ESLint cache with no TypeScript), also fails on main with Stylelint 17 and is unrelated.

Does this PR introduce a breaking change?

No. Stylelint 17 stays supported.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

README requirements line updated in this PR. Changeset added.

Use of AI

Claude Code made the change, ran the test suite and lint, and wrote this description. Reviewed by the author.


Generated by Claude Code

Summary by CodeRabbit

  • Compatibility
    • Added support for Stylelint 18 while retaining compatibility with Stylelint 17.

Widen the optional `stylelint` peer range to `^17.0.0 || ^18.0.0` and
test against `stylelint@18` in development.

Fixes #401

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FhutPyzaifmL6ciyfFmUV
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedstylelint@​17.15.0 ⏵ 18.0.099 +110010095 +4100

View full report

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The optional Stylelint peer dependency range now accepts versions 17 and 18. The development dependency range now targets Stylelint 18. The README requirements list Stylelint 18, and a changeset declares a patch release.

Severity of issue fixed: Medium

Merge Risk: Low · up to 3721e

This change lets the plugin accept Stylelint 18. The README's Node requirement does not mention that Stylelint 18 needs a newer Node release, so some users may see engine warnings. This is a small documentation fix to make before or soon after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix: support stylelint 18" matches the main change. The PR raises the stylelint development dependency to ^18.0.0, widens the optional peer dependency to accept ^17.0.0 or ^18.0.0, updates …
Linked Issues check Passed [#401, #402 objective] The issue requires the optional Stylelint peer dependency range to include Stylelint 18. The PR changes package.json peerDependencies.stylelint from ^17.0.0 to `^17.0.0 || ^…
Out of Scope Changes check Passed The reviewed changes are the package.json dependency range updates, a README requirements line change to 'Stylelint 17 or 18', and a patch changeset. All of these support the compatibility objective o…
Full details: Title check

Explanation

The title "fix: support stylelint 18" matches the main change. The PR raises the stylelint development dependency to ^18.0.0, widens the optional peer dependency to accept ^17.0.0 or ^18.0.0, updates the README, and adds a patch changeset. The title is specific and short. It states the primary purpose (Stylelint 18 compatibility), which is the reason for the linked issue. It does not mention the lockfile or the README, which is expected for a title.

Full details: Linked Issues check

Explanation

[#401, #402 objective] The issue requires the optional Stylelint peer dependency range to include Stylelint 18. The PR changes package.json peerDependencies.stylelint from ^17.0.0 to ^17.0.0 || ^18.0.0. The issue also suggests updating the development dependency. The PR changes devDependencies.stylelint from ^17.15.0 to ^18.0.0. The PR description reports that existing Stylelint test suites pass against stylelint@18.0.0. No new automated tests were added. The issue does not require new tests. The package-lock.json change is excluded by the ignored_files rule. This assessment does not depend on it, so it is not inspected. The summary is the evidence for the package.json and README changes.

Full details: Out of Scope Changes check

Explanation

The reviewed changes are the package.json dependency range updates, a README requirements line change to 'Stylelint 17 or 18', and a patch changeset. All of these support the compatibility objective of #401. The README and changeset are documentation and release metadata that describe the same change. The package-lock.json change is excluded from review by ignored_files. The PR description states it only removes packages that Stylelint 18 dropped. This assessment does not inspect that file. The plugin engines range is unchanged. The issue does not require an engines change, so this is not a scope problem.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9fd85136-a0f8-4300-8267-f262af5f49d0
Commits

Reviewing files that changed from the base of the PR and between 8e842dc and 3721e80.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 3

  • .changeset/stylelint-18.md
  • README.md
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Comment thread README.md
**The build is no longer aborted from inside the plugin.** A result reported as a webpack error fails the build the way every other webpack error does — `stats.hasErrors()` is true and the CLI exits non-zero — and the assets are still written. Nothing about severity depends on `mode` any more.

**Requirements.** Node `>= 22.12`, webpack `>= 5.106`, and ESLint 9 or 10 / Stylelint 17 for whichever checks you run.
**Requirements.** Node `>= 22.12`, webpack `>= 5.106`, and ESLint 9 or 10 / Stylelint 17 or 18 for whichever checks you run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Document the separate Node requirement for Stylelint 18.

Node 22.12 satisfies this line but is not supported by Stylelint 18.0.0. Its engine range is ^22.22.2 || ^24.15.0 || >=26.0.0. State that range alongside the plugin’s Node requirement so users can select a supported combination. (stylelint.io)

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (8e842dc) to head (3721e80).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #402   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files          21       21           
  Lines        6667     6667           
=======================================
  Hits         6647     6647           
  Misses         20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
alexander-akait merged commit b937a81 into main Nov 16, 2026
17 checks passed
@alexander-akait
alexander-akait deleted the fix/stylelint-18 branch November 16, 2026 11:02
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.

Compatibility with stylelint@18.0.0

1 participant