Skip to content

docs: add descriptions to plugin READMEs#596

Closed
kdy1 wants to merge 1 commit into
mainfrom
claude/issue-200-20260321-0030
Closed

docs: add descriptions to plugin READMEs#596
kdy1 wants to merge 1 commit into
mainfrom
claude/issue-200-20260321-0030

Conversation

@kdy1
Copy link
Copy Markdown
Member

@kdy1 kdy1 commented Mar 21, 2026

Add descriptive introductions to 12 plugin READMEs that were missing explanations of what the plugins do.

Fixes #200

Generated with Claude Code

Add descriptive introductions to 12 plugin READMEs that were missing
explanations of what the plugins do:
- jest: SWC implementation of babel-jest for fast test transforms
- noop: no-op plugin for debugging/template purposes
- loadable-components: transforms @loadable/component dynamic imports
- relay: compiles Relay GraphQL tagged template literals
- react-remove-properties: removes data-testid and similar props
- remove-console: strips console.* calls from production builds
- styled-components: adds display names and SSR support
- styled-jsx: transforms <style jsx> scoped CSS in JSX
- swc-confidential: encrypts string literals at build time
- swc-magic: processes markAsPure and other magic annotations
- swc-sdk: provides markAsPure and dynamic import transformations
- transform-imports: transforms named imports to file-level imports

Fixes #200

Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 21, 2026

⚠️ No Changeset found

Latest commit: 32f6fd6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kdy1 kdy1 closed this Mar 21, 2026
@kdy1 kdy1 deleted the claude/issue-200-20260321-0030 branch March 21, 2026 00:59
@claude
Copy link
Copy Markdown

claude Bot commented Mar 21, 2026

Code Review

Thanks for improving the plugin documentation! The descriptions are clear and well-written. Here are a few issues to address:

Bugs: Duplicate headings

Three README files end up with duplicate H1 headings after this PR. The new description adds a heading at the top, but the old heading still exists in the changelog section:

  • packages/jest/README.md: # @swc/plugin-jest appears twice
  • packages/noop/README.md: # @swc/plugin-noop appears twice
  • packages/styled-jsx/README.md: # @swc/plugin-styled-jsx appears twice

The duplicate headings in the changelog section should be removed (or the changelog section heading should be demoted to H2).

Inconsistent heading hierarchy

In two files, a new H1 (#) was added before an existing H3 (###) heading that also names the same plugin. This is structurally odd:

  • packages/relay/README.md: New # @swc/plugin-relay added before existing ### @swc/plugin-relay``
  • packages/styled-components/README.md: New # @swc/plugin-styled-components added before existing ### @swc/plugin-styled-components``

The old H3 headings that duplicate the plugin name should be removed.

Potential content inaccuracy in jest/README.md

The description says this plugin "replaces babel-jest as the transformer" and the usage example references @swc/jest as the Jest transformer — but this package is @swc/plugin-jest, which is an SWC plugin for transforming Jest globals (mocks/spies), not the transformer itself. @swc/jest is a separate package. The description and usage example appear to be describing the wrong package.

Positive changes

  • The descriptions themselves are clear, accurate, and helpful across all other plugins
  • Fixing informal names like remove-console@swc/plugin-remove-console, transform-imports@swc/plugin-transform-imports, etc. is a good cleanup
  • The swc-sdk/README.md fix promoting # Usage to ## Usage is correct
  • No changeset needed for documentation-only changes (the bot warning can be ignored)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32f6fd671a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/jest/README.md
Comment on lines +15 to +18
```js
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document how to enable the Jest wasm plugin

This example swaps Jest over to @swc/jest, but it never enables @swc/plugin-jest itself. The package only publishes a wasm artifact (packages/jest/package.json:9), and the in-repo test coverage loads it via jsc.experimental.plugins (packages/jest/__tests__/wasm.test.ts:12-23). If a user copies this snippet as-is, they install @swc/plugin-jest but still won't get the hoisting transform, so tests that depend on jest.mock() being hoisted will continue to fail.

Useful? React with 👍 / 👎.

Comment on lines +7 to +8
```sh
npm install --save-dev @swc/plugin-styled-jsx @swc/core
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the styled-jsx runtime to the install example

The new usage block only installs @swc/plugin-styled-jsx and @swc/core, but the transform's own snapshots show that the output imports styled-jsx/style (packages/styled-jsx/__tests__/__snapshots__/wasm.test.ts.snap:3-5). In a project that does not already depend on styled-jsx, following these docs leads to a module-resolution failure at build/runtime, so the install command needs to mention the runtime package too.

Useful? React with 👍 / 👎.

Comment thread packages/jest/README.md
@@ -1,5 +1,25 @@
# @swc/plugin-jest

The SWC implementation of `babel-jest`. This plugin transforms test files using SWC, enabling fast Jest-based testing without Babel. It replaces `babel-jest` as the transformer in Jest configurations and supports TypeScript, JSX, and modern JavaScript features.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Move these README edits into the template files

I checked scripts/bump-npm.sh:7-8, and every release regenerates each package README.md from its README.tmpl.md. Because this patch only updates the generated README files and leaves the templates untouched (for example packages/jest/README.tmpl.md:1-3 is still just the changelog placeholder), the new descriptions will be overwritten the next time maintainers run the bump script. The same problem applies to the other README.md-only edits in this commit.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Plugins are missing a readme telling what they do

2 participants