Skip to content

deps(stylelint-plugin, eslint-plugin): stop depending on core-strada from the linter plugins - #470

Merged
mizdra merged 1 commit into
claude/core-stradafrom
claude/linters-without-core-strada
Nov 10, 2026
Merged

mizdra merged 1 commit into
claude/core-stradafrom
claude/linters-without-core-strada

Conversation

@mizdra

@mizdra mizdra commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

ref: #377

Background

css-modules-kit is working on supporting TypeScript 7+. Specifically, the following changes are planned:

  • Add @css-modules-kit/content-mapper
    • This package is based on the Content Mapper added in TypeScript 7.1, and it can add types to *.module.css
    • It replaces @css-modules-kit/codegen and @css-modules-kit/ts-plugin
  • Make @css-modules-kit/eslint-plugin and @css-modules-kit/stylelint-plugin usable without installing TypeScript

So #466 split the code for TypeScript 6 or earlier out of @css-modules-kit/core into @css-modules-kit/core-strada. However, @css-modules-kit/eslint-plugin and @css-modules-kit/stylelint-plugin still depend on @css-modules-kit/core-strada.

Approach

@css-modules-kit/eslint-plugin and @css-modules-kit/stylelint-plugin depend on the basename function of @css-modules-kit/core-strada. This PR replaces it with the basename function of Node.js.

Note that the two functions differ. The basename function of @css-modules-kit/core-strada converts backslashes in the result of the Node.js basename function to slashes. So the results differ for a file whose name contains a backslash on Linux and macOS. For example, a\b.tsx becomes a/b.tsx with @css-modules-kit/core-strada and stays a\b.tsx with Node.js.

This difference has almost no impact on users. The result of the basename function is used only as the file name shown in the message of the no-unused-class-names rule, so what the rule reports does not change. Only a component file whose name contains a backslash is affected, and its actual file name is shown in the message.

Also, the css-modules-kit specification does not define how such a file name is shown in a message. So this change is not considered a breaking change.

@mizdra mizdra added the Type: Dependencies Dependency issues or Changes to dependency files label Nov 1, 2026
@changeset-bot

changeset-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6f08e38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@css-modules-kit/eslint-plugin Patch
@css-modules-kit/stylelint-plugin Patch
@css-modules-kit/codegen Patch
@css-modules-kit/core-strada Patch
@css-modules-kit/core Patch
@css-modules-kit/ts-plugin Patch
css-modules-kit-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mizdra
mizdra added this pull request to stack #471 November 1, 2026 16:10
@mizdra
mizdra force-pushed the claude/linters-without-core-strada branch 2 times, most recently from 00ec80a to 6f10f5b Compare November 3, 2026 03:30
@mizdra mizdra changed the title refactor(core, core-strada, codegen, stylelint-plugin, eslint-plugin): stop depending on core-strada from the linter plugins refactor(stylelint-plugin, eslint-plugin): stop depending on core-strada from the linter plugins Nov 3, 2026
@mizdra
mizdra force-pushed the claude/linters-without-core-strada branch 3 times, most recently from 93c77dc to 67acfd9 Compare November 3, 2026 04:14
…from the linter plugins

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mizdra
mizdra force-pushed the claude/linters-without-core-strada branch from 67acfd9 to 6f08e38 Compare November 3, 2026 04:32
@mizdra mizdra changed the title refactor(stylelint-plugin, eslint-plugin): stop depending on core-strada from the linter plugins deps(stylelint-plugin, eslint-plugin): stop depending on core-strada from the linter plugins Nov 3, 2026
@mizdra
mizdra marked this pull request as ready for review November 3, 2026 05:23
@mizdra
mizdra merged commit 8b7e191 into main Nov 10, 2026
16 checks passed
@mizdra
mizdra deleted the claude/linters-without-core-strada branch November 10, 2026 14:35
@github-actions github-actions Bot mentioned this pull request Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Dependencies Dependency issues or Changes to dependency files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant