Skip to content

docs: no-unused-modules is only compatible with legacy configs#358

Merged
JounQin merged 3 commits intoun-ts:masterfrom
JesseDocken:patch-1
May 30, 2025
Merged

docs: no-unused-modules is only compatible with legacy configs#358
JounQin merged 3 commits intoun-ts:masterfrom
JesseDocken:patch-1

Conversation

@JesseDocken
Copy link
Copy Markdown
Contributor

@JesseDocken JesseDocken commented May 30, 2025

As part of a discussion in eslint/eslint#19797, this updates the rule documentation for no-unused-modules to call out a compatibility issue that prevents ESLint from working properly.


Important

Add note in no-unused-modules.md about compatibility with legacy configs only.

  • Documentation:
    • Adds a note in no-unused-modules.md that no-unused-modules rule is only compatible with legacy configuration files and should not be enabled with the new flat configuration format.

This description was created by Ellipsis for 9dc6d28. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • Documentation
    • Added a note clarifying that the import-x/no-unused-modules rule is only compatible with legacy configuration files and should not be used with the new flat configuration format.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 30, 2025

Walkthrough

A note was added to the documentation for the import-x/no-unused-modules rule, clarifying its compatibility limitations with different configuration formats.

Changes

File(s) Change Summary
docs/rules/no-unused-modules.md Added a note about rule compatibility with legacy vs. flat configs

Poem

In the docs a note appears,
To clear up any hidden fears—
Flat configs and this rule don't blend,
Stick with legacy, my friend!
📝🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9783a83 and 7728493.

📒 Files selected for processing (1)
  • docs/rules/no-unused-modules.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/rules/no-unused-modules.md
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8.56 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8 on macos-latest
  • GitHub Check: Codacy Static Code Analysis

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@petercat-assistant
Copy link
Copy Markdown

Walkthrough

This pull request updates the documentation for the no-unused-modules rule to highlight a compatibility issue. Specifically, it notes that the rule is only compatible with legacy configuration files and should not be enabled when using the new flat configuration format.

Changes

File Summary
docs/rules/no-unused-modules.md Added an important note about compatibility with legacy configuration files and the new flat configuration format.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 9dc6d28 in 22 seconds. Click for details.
  • Reviewed 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/rules/no-unused-modules.md:11
  • Draft comment:
    Clear note added about legacy config compatibility. Consider adding a link or brief reference to ESLint's flat configuration docs so users understand the context.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_08AYTkKHtA4cKixn

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented May 30, 2025

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/rules/no-unused-modules.md (1)

11-12: Nit: Harmonize admonition style with existing docs.

Elsewhere in this documentation (e.g., line 137) you’re using a #### Important Note heading rather than a [!IMPORTANT] block. For consistency, consider switching to the same format:

- > [!IMPORTANT]
- > This rule is only compatible with legacy configuration files. If you make use of the new flat configuration format, do not enable this rule.
+ #### Important Note
+
+ This rule is only compatible with legacy configuration files. If you make use of the new flat configuration format, do not enable this rule.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d00d9f8 and 9dc6d28.

📒 Files selected for processing (1)
  • docs/rules/no-unused-modules.md (1 hunks)
🔇 Additional comments (1)
docs/rules/no-unused-modules.md (1)

11-12: Approve: Compatibility note added for legacy configs.

The new admonition clearly informs users about the limitation with the flat config format, which aligns with the PR objective and helps prevent misconfiguration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 30, 2025

⚠️ No Changeset found

Latest commit: 7728493

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

@JounQin JounQin changed the title Add note that no-unused-modules only works with legacy configs docs: no-unused-modules is only compatible with legacy config May 30, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented May 30, 2025

Open in StackBlitz

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

commit: 7728493

@JounQin JounQin changed the title docs: no-unused-modules is only compatible with legacy config docs: no-unused-modules is only compatible with legacy configs May 30, 2025
JesseDocken and others added 3 commits May 30, 2025 23:51
Signed-off-by: Jesse Docken <118761625+JesseDocken@users.noreply.github.com>
Signed-off-by: JounQin <admin@1stg.me>
Signed-off-by: Jesse Docken <118761625+JesseDocken@users.noreply.github.com>
@JounQin JounQin merged commit 10e40b7 into un-ts:master May 30, 2025
46 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.

2 participants