Skip to content

docs: document the esmodule option for no-dynamic-require rule - #496

Merged
JounQin merged 2 commits into
un-ts:masterfrom
baevm:fix-no-dynamic-require-esmodule-doc
Jun 23, 2026
Merged

JounQin merged 2 commits into
un-ts:masterfrom
baevm:fix-no-dynamic-require-esmodule-doc

Conversation

@baevm

@baevm baevm commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

this PR documents the esmodule option for no-dynamic-require rule. Fixes #467

Summary by CodeRabbit

  • Documentation

    • Added comprehensive documentation for the esmodule option in the no-dynamic-require rule, including detailed examples of allowed and disallowed dynamic import patterns.
  • Chores

    • Version bump for eslint-plugin-import-x (patch release).

@changeset-bot

changeset-bot Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9b368af

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

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 99c8389b-f158-46dd-b559-3b5d568c1533

📥 Commits

Reviewing files that changed from the base of the PR and between 7578513 and 0be4b5e.

📒 Files selected for processing (2)
  • .changeset/quiet-forks-cheer.md
  • docs/rules/no-dynamic-require.md

📝 Walkthrough

Walkthrough

Adds an Options section to docs/rules/no-dynamic-require.md documenting the esmodule configuration option, including Fail and Pass code examples for dynamic import() expressions. A new patch-level changeset entry is also added for eslint-plugin-import-x.

Changes

no-dynamic-require esmodule documentation

Layer / File(s) Summary
esmodule option docs and changeset
docs/rules/no-dynamic-require.md, .changeset/quiet-forks-cheer.md
Adds an Options section documenting the esmodule flag—explaining that dynamic import() is not reported by default but is reported when { "esmodule": true } is set—with Fail/Pass examples. Registers a corresponding patch changeset entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

documentation

Suggested reviewers

  • JounQin
  • 43081j

Poem

🐇 A rule once silent on import() calls,
Now speaks with examples in docs and halls.
Set esmodule: true and watch it enforce,
Or leave it unset—static paths, of course!
The changeset is patched, the bunny is glad. 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: document the esmodule option for no-dynamic-require rule' clearly and specifically describes the main change in the PR.
Linked Issues check ✅ Passed The PR implements the requirement from issue #467 by adding comprehensive documentation for the esmodule option to the no-dynamic-require rule's documentation file.
Out of Scope Changes check ✅ Passed All changes are within scope: documentation update for the esmodule option and a Changesets entry for version tracking. No unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@codesandbox-ci

codesandbox-ci Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-import-x@496

commit: 9b368af

@codacy-production

codacy-production Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread .changeset/quiet-forks-cheer.md Outdated
@JounQin
JounQin merged commit b543300 into un-ts:master Jun 23, 2026
55 checks passed
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.

doc(no-dynamic-require): add doc for the esmodule option

2 participants