Skip to content

Conversation

43081j
Copy link
Collaborator

@43081j 43081j commented May 26, 2025

ESLint doesn't understand what flatConfigs is, the actual config object is configs. So we need to expose the flat configs there in order for ESLint's extends logic to work properly.

This means extends: ['import-x/flat/recommended'] will now work.


Important

Expose flat configurations in configs object to support ESLint extends logic, with documentation updates and configuration emojis.

  • Behavior:
    • Expose flat configurations in configs object in src/index.ts to support ESLint extends logic.
    • extends: ['import-x/flat/recommended'] now works.
  • Documentation:
    • Update README.md to include examples using defineConfig with flat configurations.
    • Update rule documentation in docs/rules/*.md to reflect new flat configuration presets.
  • Misc:
    • Add configuration emojis for flat configs in .eslint-doc-generatorrc.js.

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


Summary by CodeRabbit

  • New Features
    • Exposed flat ESLint configuration objects, making it easier to extend and reference plugin configurations.
  • Documentation
    • Updated documentation and rule tables to reflect expanded support for flat configs and clarified which rules are enabled in each configuration.
    • Added examples for using the new flat configs and updated badge symbols for easier identification.
  • Chores
    • Updated configuration files and scripts to simplify and improve documentation generation and configuration management.

ESLint doesn't understand what `flatConfigs` is, the actual config
object is `configs`. So we need to expose the flat configs there in
order for ESLint's `extends` logic to work properly.

This means `extends: ['import-x/recommended']` will now work.
Copy link

changeset-bot bot commented May 26, 2025

🦋 Changeset detected

Latest commit: e5e1de5

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

This PR includes changesets to release 1 package
Name Type
eslint-plugin-import-x Minor

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

Copy link

coderabbitai bot commented May 26, 2025

Walkthrough

This change updates the eslint-plugin-import-x package to expose both legacy and flat ESLint configuration objects under a unified configs property. Documentation and metadata are revised to reflect these new configuration options, and the README is updated with usage examples and configuration badges. No functional rule logic changes are introduced.

Changes

File(s) Change Summary
src/index.ts Refactored to combine and expose both legacy and flat configs under configs; updated exports and plugin object.
README.md Updated with flat config usage examples and new badges for configuration coverage in rules tables.
docs/rules/default.md, docs/rules/export.md, docs/rules/named.md,
docs/rules/namespace.md, docs/rules/no-unresolved.md
Updated to indicate rules are enabled in new flat configs (flat/errors, flat/recommended, etc.).
docs/rules/no-duplicates.md, docs/rules/no-named-as-default-member.md,
docs/rules/no-named-as-default.md, docs/rules/no-rename-default.md
Updated documentation to reflect warning status in new flat configs.
.eslint-doc-generatorrc.js Added config emojis, rule doc formatting options, ignore config list, and rule list grouping to the config.
package.json Simplified the update:eslint-docs script by removing CLI options.
patches/eslint-doc-generator+2.1.2.patch Commented out reserved emoji restriction in parseConfigEmojiOptions for documentation generator.
.changeset/smooth-horses-greet.md Added a changeset describing the minor version update and new config exposure.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Plugin
    participant ESLint

    User->>Plugin: Import plugin and reference configs
    Plugin->>Plugin: Expose configs (legacy + flat) via `configs` property
    Plugin->>ESLint: Provide selected config object(s)
    ESLint->>ESLint: Apply configuration to linting process
Loading

Possibly related PRs

Suggested labels

documentation, enhancement, feature

Suggested reviewers

  • 43081j

Poem

In the warren of configs, both flat and old,
A rabbit hopped forth, brave and bold.
With badges and docs, it tidied the way,
So ESLint could frolic without delay.
Now unified configs are easy to find—
Hooray for the bunny, so clever and kind! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/index.ts

Oops! Something went wrong! :(

ESLint: 9.27.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js
at finalizeResolution (node:internal/modules/esm/resolve:274:11)
at moduleResolve (node:internal/modules/esm/resolve:859:10)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

.eslint-doc-generatorrc.js

Oops! Something went wrong! :(

ESLint: 9.27.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js
at finalizeResolution (node:internal/modules/esm/resolve:274:11)
at moduleResolve (node:internal/modules/esm/resolve:859:10)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)


📜 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 41bc731 and e5e1de5.

📒 Files selected for processing (15)
  • .changeset/smooth-horses-greet.md (1 hunks)
  • .eslint-doc-generatorrc.js (1 hunks)
  • README.md (5 hunks)
  • docs/rules/default.md (1 hunks)
  • docs/rules/export.md (1 hunks)
  • docs/rules/named.md (1 hunks)
  • docs/rules/namespace.md (1 hunks)
  • docs/rules/no-duplicates.md (1 hunks)
  • docs/rules/no-named-as-default-member.md (1 hunks)
  • docs/rules/no-named-as-default.md (1 hunks)
  • docs/rules/no-rename-default.md (1 hunks)
  • docs/rules/no-unresolved.md (1 hunks)
  • package.json (1 hunks)
  • patches/eslint-doc-generator+2.1.2.patch (1 hunks)
  • src/index.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/index.ts (1)
src/types.ts (2)
  • PluginConfig (49-53)
  • PluginFlatConfig (60-62)
🪛 LanguageTool
README.md

[duplication] ~259-~259: Possible typo: you repeated a word.
Context: ...me name. | ❗ ❗ ☑️ ☑️ | | | | | |...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~283-~283: Possible typo: you repeated a word.
Context: ... import. | ❗ ❗ ☑️ ☑️ | | | | | | | [na...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~284-~284: Possible typo: you repeated a word.
Context: ...n the remote file. | ❗ ❗ ☑️ ☑️ | | ⌨️ ⌨️ | | | | | [na...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~284-~284: Possible typo: you repeated a word.
Context: ...ile. | ❗ ❗ ☑️ ☑️ | | ⌨️ ⌨️ | | | | | [namespace](docs/...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~285-~285: Possible typo: you repeated a word.
Context: ...perties as they are dereferenced. | ❗ ❗ ☑️ ☑️ | | | | | | | [no...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~294-~294: Possible typo: you repeated a word.
Context: ...esolved. | ❗ ❗ ☑️ ☑️ | | | | | | | [no...

(ENGLISH_WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms (46)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on macos-latest
🔇 Additional comments (19)
docs/rules/default.md (1)

3-3: Docs: Enabled flat configs in default rule header
The header now correctly includes flat/errors and flat/recommended alongside the legacy errors and recommended configs, and matches the iconography used elsewhere.

docs/rules/namespace.md (1)

3-3: Docs: Enabled flat configs in namespace rule header
The update adds flat/errors and flat/recommended to the enabled configs list, consistent with the default rule and PR objectives.

docs/rules/no-duplicates.md (1)

3-3: Docs: Warns in flat configs for no-duplicates
The rule header correctly includes flat/recommended and flat/warnings in the warning configs list, aligning with the new flat config exposure.

docs/rules/no-named-as-default-member.md (1)

3-3: Docs: Warns in flat configs for no-named-as-default-member
The heading now lists flat/recommended and flat/warnings alongside the existing recommended and warnings configs, as intended by the PR.

docs/rules/no-unresolved.md (1)

3-3: Docs: Enabled flat configs in no-unresolved rule header
flat/errors and flat/recommended have been added to the enabled configs list, mirroring the other rule updates and fulfilling the PR goals.

docs/rules/export.md (1)

3-3: Flat config support documented
The header correctly includes the new flat/errors and flat/recommended presets alongside the existing configs, matching the PR objectives.

docs/rules/no-named-as-default.md (1)

3-3: Flat config warning list updated
The rule header now lists both flat/recommended and flat/warnings in addition to the legacy configs, aligning with the flat config exposure.

docs/rules/no-rename-default.md (1)

3-3: Added flat config to warnings header
The documentation header now reflects flat/warnings alongside warnings, ensuring consistency with other rule docs.

package.json (1)

63-63: Simplify update:eslint-docs script
You've removed the inline CLI flags in favor of centralizing settings in .eslint-doc-generatorrc.js. Please verify that the config file includes all previous options so documentation generation remains unchanged.

.changeset/smooth-horses-greet.md (1)

1-6: Changeset summary is clear
The changeset correctly marks a minor release and succinctly describes exposing flat configs in the configs object. It aligns with conventional changeset formatting.

docs/rules/named.md (1)

3-3: Documentation correctly updated for flat config support.

The rule documentation has been properly updated to include the new flat configuration presets (flat/errors, flat/recommended, flat/typescript) alongside the existing legacy configurations. This aligns well with the PR objective of exposing flat configurations.

patches/eslint-doc-generator+2.1.2.patch (1)

9-14: Patch enables reserved emoji usage for documentation generation.

The patch correctly comments out the reserved emoji validation while preserving the essential config existence check. This enables the use of reserved emojis (like ❗, ☑️, ⌨️) in the configEmoji configuration needed for documenting the new flat configurations.

.eslint-doc-generatorrc.js (1)

7-17: Configuration properly set up for flat config documentation generation.

The ESLint documentation generator configuration has been correctly extended with:

  • Appropriate emoji mappings for flat configurations (flat/errors, flat/recommended, etc.)
  • Enhanced documentation formatting options
  • Proper ignoring of stage-0 configurations

This configuration supports the comprehensive documentation updates for the new flat configuration exposure.

README.md (2)

166-183: Excellent addition of defineConfig usage example.

The new section properly demonstrates how to use defineConfig with the flat configuration system, including the correct usage of extends: ['import-x/flat/recommended'] as mentioned in the PR objectives. This provides users with a clear example of the new functionality.


257-297:

✅ Verification successful

Verify emoji duplications in rules tables.

The static analysis tools have flagged repeated emojis in the rules tables. While these appear to represent different configuration badges (legacy vs flat configs), please verify that the emoji repetitions are intentional and correctly represent the different configuration types.

For example, on line 259: ❗ ❗ ☑️ ☑️ suggests both legacy and flat versions of the same configuration types.

Let me verify the emoji patterns in the rules tables to ensure they're correctly representing both legacy and flat configurations:


🏁 Script executed:

#!/bin/bash
# Description: Check emoji patterns in README rules tables to verify they represent distinct configurations

# Extract lines with emoji patterns from the README
rg -A 2 -B 2 '❗.*❗|☑️.*☑️|⌨️.*⌨️' README.md

# Check if the pattern consistently shows pairs for legacy/flat configs
rg '\| [^|]*\| [^|]*\| ❗ ❗ ☑️ ☑️' README.md

Length of output: 7021


Emoji Duplication Verified as Intentional

I’ve checked every occurrence of doubled emojis (e.g. ❗ ❗ ☑️ ☑️ and ☑️ 🚸 ☑️ 🚸) in the rules tables of README.md. They consistently appear on the same rules—export, default, named, namespace, no-unresolved, no-named-as-default, etc.—to denote legacy vs. flat‐config badges. No changes are needed.

🧰 Tools
🪛 LanguageTool

[duplication] ~259-~259: Possible typo: you repeated a word.
Context: ...me name. | ❗ ❗ ☑️ ☑️ | | | | | |...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~283-~283: Possible typo: you repeated a word.
Context: ... import. | ❗ ❗ ☑️ ☑️ | | | | | | | [na...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~284-~284: Possible typo: you repeated a word.
Context: ...n the remote file. | ❗ ❗ ☑️ ☑️ | | ⌨️ ⌨️ | | | | | [na...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~284-~284: Possible typo: you repeated a word.
Context: ...ile. | ❗ ❗ ☑️ ☑️ | | ⌨️ ⌨️ | | | | | [namespace](docs/...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~285-~285: Possible typo: you repeated a word.
Context: ...perties as they are dereferenced. | ❗ ❗ ☑️ ☑️ | | | | | | | [no...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~294-~294: Possible typo: you repeated a word.
Context: ...esolved. | ❗ ❗ ☑️ ☑️ | | | | | | | [no...

(ENGLISH_WORD_REPEAT_RULE)

src/index.ts (4)

150-150: LGTM: Correct circular dependency handling.

Using plugin_ here is the right approach to avoid circular dependency issues, as the plugin object hasn't been initialized yet at this point in the code. This aligns with the explanation provided in previous comments.


169-193: Excellent implementation of unified configs object.

This perfectly addresses the PR objectives by:

  1. Exposing flat configs: All flat configurations are now accessible via flat/ prefixed keys
  2. Enabling extends syntax: Users can now use extends: ['import-x/flat/recommended'] as intended
  3. Maintaining backwards compatibility: Legacy configs remain available without prefixes
  4. Type safety: The satisfies annotation ensures type correctness for both config types

The consistent flat/ naming convention makes it clear which configurations are for flat config usage.


194-197: Clean type-safe plugin extension.

The type assertion approach properly extends the base plugin object with the new config properties while maintaining TypeScript safety. This is preferable to object spreading and clearly indicates the expected structure.


200-200: Essential assignment for extends functionality.

This assignment makes the unified configs object accessible through the plugin, which is crucial for enabling ESLint's extends: ['import-x/flat/recommended'] syntax to work properly.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

Copy link

Walkthrough

This pull request addresses an issue where ESLint does not recognize flatConfigs. The change involves exposing the flat configurations within the configs object, enabling ESLint's extends logic to function correctly. This allows configurations like extends: ['import-x/recommended'] to work as intended.

Changes

File Summary
.changeset/smooth-horses-greet.md Added a changeset to expose flat configs in the configs object for ESLint extends compatibility.
src/index.ts Refactored to include flat configurations within the configs object and updated the plugin export to include these configurations.

Copy link

codesandbox-ci bot commented May 26, 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

pkg-pr-new bot commented May 26, 2025

Open in StackBlitz

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

commit: e5e1de5

Copy link

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

Caution

Changes requested ❌

Reviewed everything up to 155eb82 in 1 minute and 28 seconds. Click for details.
  • Reviewed 98 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 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. .changeset/smooth-horses-greet.md:5
  • Draft comment:
    The changeset message clearly describes the intent to expose flat configs in the 'configs' object.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. src/index.ts:135
  • Draft comment:
    Removing the legacy 'configs' property from the initial plugin_ object avoids potential circular references and keeps config exposure centralized.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining the reason behind a change without suggesting any action or asking for confirmation. It doesn't align with the rules for useful comments.
3. src/index.ts:150
  • Draft comment:
    Switching from 'plugin' to 'plugin_' in createFlatConfig avoids a circular dependency by not referencing the not-yet-extended plugin object.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is informative, explaining why a change was made to avoid a circular dependency. It doesn't ask for confirmation or suggest any changes.
4. src/index.ts:194
  • Draft comment:
    Extending the plugin object via a type cast to include both flatConfigs and configs improves clarity and aligns with ESLint's expectations.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply praises the change without offering any specific guidance or questions.

Workflow ID: wflow_5hFmLsIa2LdXgSQo

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

Copy link

codacy-production bot commented May 26, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (41bc731) 3625 3473 95.81%
Head commit (e5e1de5) 3626 (+1) 3474 (+1) 95.81% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#350) 3 3 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.27%. Comparing base (41bc731) to head (e5e1de5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #350   +/-   ##
=======================================
  Coverage   96.27%   96.27%           
=======================================
  Files          92       92           
  Lines        4835     4836    +1     
  Branches     1823     1825    +2     
=======================================
+ Hits         4655     4656    +1     
  Misses        179      179           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@JounQin JounQin left a comment

Choose a reason for hiding this comment

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

Related usage document needs to be updated (add instead of replace).

Copy link

@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 cd90feb in 45 seconds. Click for details.
  • Reviewed 30 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. README.md:167
  • Draft comment:
    The new defineConfig snippet is clear and correctly demonstrates using flat configs (e.g. 'import-x/flat/recommended'). Nice update!
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_86zbixDHke7lSUnw

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

Copy link

@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 (3)
docs/rules/named.md (1)

3-3: Separate enabled & disabled icons for clarity
The header prefixes both “💼” and “🚫” at once, which can be misleading. Consider splitting the icons: use “💼” before the enabled list and “🚫” before the disabled list.

README.md (2)

140-142: Fix grammatical number agreement in note
Change “configuration” to “configurations” for correct plural form.

- > [!NOTE]
- > A complete list of available configuration can be found in [config/flat folders](src/config/flat)
+ > [!NOTE]
+ > A complete list of available configurations can be found in [config/flat folders](src/config/flat)

165-182: Suggest using the exported flatConfigs object directly
To demonstrate the newly exposed flatConfigs, consider extending using the imported object instead of a string literal:

-    extends: ['import-x/flat/recommended'],
+    extends: [importX.flatConfigs.recommended],

This showcases the plugin’s flatConfigs export in action.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 155eb82 and cd90feb.

📒 Files selected for processing (11)
  • README.md (6 hunks)
  • docs/rules/default.md (1 hunks)
  • docs/rules/export.md (1 hunks)
  • docs/rules/named.md (1 hunks)
  • docs/rules/namespace.md (1 hunks)
  • docs/rules/no-deprecated.md (1 hunks)
  • docs/rules/no-duplicates.md (1 hunks)
  • docs/rules/no-named-as-default-member.md (1 hunks)
  • docs/rules/no-named-as-default.md (1 hunks)
  • docs/rules/no-rename-default.md (1 hunks)
  • docs/rules/no-unresolved.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

189-189: Blank line inside blockquote
null

(MD028, no-blanks-blockquote)

⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8.56 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8.56 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8.56 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8.56 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8.56 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 9 on macos-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8.56 on macos-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on macos-latest
🔇 Additional comments (10)
docs/rules/no-rename-default.md (1)

3-3: Docs: Clarify warning presets to include flat variant
The update correctly expands the rule’s warning contexts to both flat/warnings and the legacy warnings preset, matching the newly exposed flat configurations.

docs/rules/no-named-as-default.md (1)

3-3: Ensure documentation consistency for flat configs
The addition of flat/recommended and flat/warnings aligns this rule’s docs with the new flat config exports. Please verify that all other rule documentation under docs/rules/ has been updated similarly to include the flat/ prefixes where appropriate.

docs/rules/no-named-as-default-member.md (1)

3-3: Expose flat configuration presets.
The addition of flat/recommended and flat/warnings aligns this rule’s documentation with the newly exported flat configs, ensuring ESLint users can reference the correct presets.

docs/rules/export.md (1)

3-3: Rule activation configs updated to include flat configurations

The list of enabled configurations now correctly includes flat/errors and flat/recommended, aligning with the new configs.flatConfigs exposure in src/index.ts. Documentation formatting remains consistent.

docs/rules/default.md (1)

3-3: Default import rule now enabled in flat configs

The metadata for the import-x/default rule has been expanded to include flat/errors and flat/recommended. This matches the plugin’s updated configs object and maintains consistency with other rule docs.

docs/rules/namespace.md (1)

3-3: Namespace rule activation extended to flat configs

The import-x/namespace rule header now accurately lists flat/errors and flat/recommended alongside the existing presets. This aligns the documentation with the plugin’s new flat configuration exposure.

docs/rules/no-unresolved.md (1)

3-3: No-unresolved rule enabled in flat configurations

The rule header for import-x/no-unresolved correctly adds flat/errors and flat/recommended to its activation list, matching the configs object update.

docs/rules/no-duplicates.md (1)

3-3: No-duplicates rule warnings extended to flat configs

The warning presets for import-x/no-duplicates now include flat/recommended and flat/warnings, ensuring consistency with the plugin’s flat configuration support.

docs/rules/named.md (1)

3-3: Documentation accurately reflects new flat configs
The additions flat/errors and flat/recommended in the enabled list (and disabled flat/typescript/typescript) align with the update.

docs/rules/no-deprecated.md (1)

3-3: New warning note is accurate
The added line correctly documents that this rule warns in the flat/stage-0 config, aligning with the PR objectives.

Copy link

@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)
README.md (1)

165-182: Add TOC entry for the new defineConfig section and align the example with other flat configs
The new “Configuration (using defineConfig)” section is a valuable addition, but it’s not yet linked in the table of contents. Also, for consistency with the other flat‐config examples, consider referencing the flatConfigs object directly instead of a string literal.

--- README.md
@@ -28,6 +28,7 @@
   - [As a standalone ESLint plugin](#as-a-standalone-eslint-plugin)
+  - [Configuration (using `defineConfig`)](#configuration-using-defineconfig)
   - [Configuration (legacy: `.eslintrc*`)](#configuration-legacy-eslintrc)
--- README.md
@@ -176,7 +176,7 @@
     plugins: {
       'import-x': importX,
     },
-    extends: ['import-x/flat/recommended'],
+    extends: [importX.flatConfigs.recommended],
     rules: {
       'import-x/no-dynamic-require': 'warn',
     },
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cd90feb and a82e36b.

📒 Files selected for processing (1)
  • README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~314-~314: You might be missing the article “a” here.
Context: ... | Prefer a default export if module exports a single name or multiple names...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8.56 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8.56 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8.56 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8.56 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 8.56 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 24 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8 on macos-latest
  • GitHub Check: Lint and Test with Node.js 22 and ESLint 8.56 on macos-latest
  • GitHub Check: Lint and Test with Node.js 20 and ESLint 9 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 8.56 on macos-latest

@JounQin
Copy link
Member

JounQin commented May 26, 2025

This means extends: ['import-x/recommended'] will now work.

I suppose you mean ['import-x/flat/recommended'] will now work.

Copy link

@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 040c4f8 in 1 minute and 43 seconds. Click for details.
  • Reviewed 45 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 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. README.md:137
  • Draft comment:
    Changed admonition marker syntax from “[!NOTE]” to "> [!NOTE]". Please confirm that the added blockquote (>) and escaping of brackets render as intended in your documentation.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm the rendering of a syntax change in documentation. This falls under asking the author to confirm their intention or to ensure the behavior is intended, which is against the rules.
2. README.md:183
  • Draft comment:
    Admonition markers like [!TIP], [!NOTE], and [!WARNING] are now prefixed with a blockquote (>) and have their brackets escaped. Ensure this formatting is consistent and renders correctly across all environments.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and asks the author to ensure consistency and correct rendering, which violates the rules. It doesn't provide a specific suggestion or point out a specific issue with the code.
3. README.md:340
  • Draft comment:
    The warning admonition marker was updated from “[!warning]” to "> [!warning]". Verify that this change maintains the intended styling and clarity in the documentation.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to verify the change, which violates the rule against asking for confirmation or verification of intention. It does not provide a specific suggestion or point out a clear issue with the code.
4. README.md:140
  • Draft comment:
    Line 140: It appears there is an unnecessary escape character before [!NOTE]. If this is not intentional for proper markdown rendering, please remove the backslash.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The diff shows a consistent pattern of adding backslashes before these note/tip/warning markers. This is likely an intentional change to properly render these GitHub-style alerts in Markdown. The backslashes are probably necessary for proper rendering. The comment is suggesting to undo what appears to be an intentional change. Could there be a reason why the backslashes were added? Maybe they're needed for proper Markdown rendering on certain platforms. Yes, the backslashes appear to be intentionally added across multiple similar markers in the file, suggesting they serve a purpose for proper Markdown rendering. The comment should be deleted as it's suggesting to undo what appears to be an intentional and consistent change to the Markdown formatting.
5. README.md:219
  • Draft comment:
    Typo: It looks like there’s an unnecessary backslash before [!WARNING]. If the intention is to render the admonition correctly, please remove the backslash.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The diff shows multiple instances where backslashes were intentionally added before admonition tags. This appears to be a deliberate change to the formatting. The comment suggests undoing one of these changes, which would break consistency. Since this is a pattern being applied across the file, the backslash is likely intentional and serves some purpose. I could be wrong about the purpose of the backslashes - maybe they really are unnecessary. However, the consistent pattern of adding them suggests they serve some function. Given that this is a systematic change across the file and appears intentional, suggesting to remove the backslash would likely be counterproductive. The comment should be deleted as it suggests undoing what appears to be an intentional formatting change that is being consistently applied throughout the file.

Workflow ID: wflow_iP5P7PbacMBIAmmx

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

@JounQin JounQin force-pushed the configs-names branch 2 times, most recently from c5a1261 to 0297826 Compare May 26, 2025 23:31
Copy link

@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 0297826 in 1 minute and 17 seconds. Click for details.
  • Reviewed 62 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 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. README.md:29
  • Draft comment:
    Good TOC update: added 'Using defineConfig' improves navigation.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it only praises the update to the table of contents without providing any actionable feedback or suggestions. It does not align with the rules for useful comments.
2. README.md:138
  • Draft comment:
    Fix note admonition markup: use '> [!NOTE]' instead of escaped syntax.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. README.md:163
  • Draft comment:
    Update defineConfig heading for consistency with TOC.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, suggesting an update for consistency with the Table of Contents. It doesn't provide a specific code suggestion or highlight a potential issue with the code itself. It doesn't align with the rules for useful comments.
4. README.md:184
  • Draft comment:
    Correct TIP admonition syntax to '> [!TIP]'.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it is simply stating the correct syntax for a TIP admonition. It does not provide a suggestion or ask for confirmation about the code's functionality or logic.
5. README.md:187
  • Draft comment:
    Correct NOTE admonition syntax to '> [!NOTE]'.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it is just pointing out the correct syntax for a NOTE admonition. It doesn't suggest a change or ask for clarification on the code's intention.
6. README.md:217
  • Draft comment:
    Fix WARNING admonition: use '> [!WARNING]' for proper rendering.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, suggesting a change for proper rendering of a warning admonition. It doesn't ask for a specific code change or test, nor does it point out a potential issue with the code logic. It seems to be more about formatting for documentation purposes.
7. README.md:341
  • Draft comment:
    Ensure consistent admonition formatting: use '> [!warning]'.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
8. README.md:142
  • Draft comment:
    Typo suggestion: Consider updating "available configuration" to "available configurations" (plural) for improved clarity.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_RNZL4SYnzVvoVmux

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

Copy link

@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 c5a1261 in 1 minute and 56 seconds. Click for details.
  • Reviewed 62 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 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. README.md:29
  • Draft comment:
    Nice TOC update with 'Using defineConfig'; ensure the section header level stays consistent with the rest of the document.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. README.md:138
  • Draft comment:
    Admonition markers now escaped (e.g. [!NOTE]). Confirm that the target Markdown parser renders these as intended.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. README.md:163
  • Draft comment:
    Heading changed from '## Configuration (using defineConfig)' to '### Using defineConfig'; verify this level change is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. README.md:184
  • Draft comment:
    Escaped admonition blocks [!TIP] and [!NOTE] are now shown as > [!TIP] and > [!NOTE]. Confirm that this change displays correctly.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. README.md:217
  • Draft comment:
    The [!WARNING] block is now escaped ([!WARNING]). Ensure that the intended styling is preserved.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. README.md:341
  • Draft comment:
    Admonition [!warning] now appears as > [!warning]. Consider matching the capitalization with other warning blocks for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. README.md:141
  • Draft comment:
    It appears there's a stray backslash in the note admonition "[!NOTE]". If this is unintentional (and the intent is to have a standard admonition rendered as "[!NOTE]"), please remove the backslash.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The change to add backslashes appears to be intentional since it was done consistently across multiple admonitions (lines 141, 187, 191, 220). This suggests it's a deliberate styling choice, not a mistake. The comment assumes this is unintentional but provides no evidence for why the unescaped version would be better. The backslashes could be interfering with proper rendering of GitHub note admonitions. I should check if this is a known GitHub markdown syntax requirement. Even if unescaped brackets might work better for GitHub admonitions, the consistent application of backslashes across the file suggests this was an intentional choice by the author. Without strong evidence that this breaks functionality, we should respect the author's formatting choice. Delete the comment since it questions an intentional formatting choice without providing evidence that it causes actual problems.
8. README.md:344
  • Draft comment:
    Typographical error: It appears that the [!warning] syntax is unintentionally preceded by a backslash (\[!warning]). If this is not intentional, please remove the extra backslash to use the correct syntax.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% Looking at the pattern in the diff, I see that ALL alert block syntax was intentionally changed to add backslashes. This wasn't a typo - it was a deliberate change made consistently throughout the file. The comment is suggesting to undo what appears to be an intentional change. Since this is a UI/documentation change and was done consistently, we should assume the author knows what they're doing. Maybe there's some GitHub Markdown syntax requirement I'm not aware of that makes the backslash incorrect? But even if so, we shouldn't comment on pure documentation formatting. The rules explicitly state not to comment on UI changes and to assume the author made UI changes correctly. This is a pure documentation formatting change. Delete this comment since it's suggesting to undo what appears to be an intentional documentation formatting change, and we're told not to comment on UI/documentation changes.

Workflow ID: wflow_OHXcFVT9bQGhTRbw

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

Copy link

@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 8a55e21 in 49 seconds. Click for details.
  • Reviewed 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 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. README.md:32
  • Draft comment:
    TOC update: Added a 'Using defineConfig' bullet to match the new config section. Looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. README.md:163
  • Draft comment:
    Updated header level to '### Using defineConfig' for consistency with surrounding config examples.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_RkoSNiflyanerKRX

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

Copy link

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 3

🧹 Nitpick comments (1)
README.md (1)

315-315: Typo: missing article in description
The description reads “if module exports a single name or multiple names.” It should be “if a module exports…” to include the missing article.

-| [prefer-default-export](docs/rules/prefer-default-export.md)                     | Prefer a default export if module exports a single name or multiple names.  | …
+| [prefer-default-export](docs/rules/prefer-default-export.md)                     | Prefer a default export if a module exports a single name or multiple names.  | …
🧰 Tools
🪛 LanguageTool

[uncategorized] ~315-~315: You might be missing the article “a” here.
Context: ... | Prefer a default export if module exports a single name or multiple names...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

🛑 Comments failed to post (3)
README.md (3)

296-316: ⚠️ Potential issue

Missing reference definitions for custom badges in the Style guide table
The style guide rows reference ![badge-flat/recommended][], ![badge-flat/warnings][], etc., yet the README lacks those definitions.

Include all needed badge reference links at the bottom of the document.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~315-~315: You might be missing the article “a” here.
Context: ... | Prefer a default export if module exports a single name or multiple names...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

🤖 Prompt for AI Agents
In README.md around lines 296 to 316, the style guide table uses custom badge
references like ![badge-flat/recommended][] and ![badge-flat/warnings][], but
these badge definitions are missing from the document. To fix this, add the
corresponding markdown reference definitions for all custom badges used in the
table at the bottom of the README file, ensuring each badge name is linked to
the correct image URL or resource.

253-264: ⚠️ Potential issue

Missing reference definitions for custom badges in the Helpful warnings table
The rows reference badges like ![badge-flat/errors][] and ![badge-flat/recommended][], but there are no [badge-flat/errors]: ... or [badge-flat/recommended]: ... links later in the document. Without these, the badges won’t render.

Please add corresponding reference definitions (e.g., at the bottom of the README) for each custom badge.

🤖 Prompt for AI Agents
In README.md around lines 253 to 264, the markdown table uses custom badge
references like ![badge-flat/errors][] and ![badge-flat/recommended][], but the
corresponding reference definitions for these badges are missing. To fix this,
add the missing badge reference definitions at the bottom of the README file,
defining the URLs or image sources for each badge name used in the table,
ensuring the badges render correctly.

277-286: ⚠️ Potential issue

Missing reference definitions for custom badges in the Static analysis table
This table also uses badge placeholders (e.g., ![badge-flat/errors][]), but their link definitions are absent.

Add [badge-flat/errors]: <badge-URL> and similar entries so the badges display properly.

🤖 Prompt for AI Agents
In README.md around lines 277 to 286, the markdown table uses custom badge
placeholders like ![badge-flat/errors][] but lacks the corresponding reference
link definitions. Add the missing reference definitions for these badges at the
bottom of the README or an appropriate section, for example, add lines such as
[badge-flat/errors]: <badge-URL> for each badge used to ensure they render
correctly.

Copy link

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License

View full report

Copy link

@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 e5e1de5 in 1 minute and 24 seconds. Click for details.
  • Reviewed 351 lines of code in 13 files
  • Skipped 1 files when reviewing.
  • Skipped posting 14 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. .eslint-doc-generatorrc.js:18
  • Draft comment:
    The doc generator configuration is concise and follows best practices. Verify that the Prettier options and rule settings meet your project’s formatting needs.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. README.md:162
  • Draft comment:
    Excellent addition of the 'Using defineConfig' section. The provided example is clear—ensure that the admonition markers (e.g. '> [!NOTE]') render correctly in your documentation system.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. docs/rules/default.md:3
  • Draft comment:
    The header now correctly lists both '❗ errors' and '❗ flat/errors'. This improves clarity. Make sure this symbol usage remains consistent across all rule docs.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. docs/rules/export.md:3
  • Draft comment:
    The configuration info now shows '❗' for flat/errors as well as for errors. This aligns with the updated enforcement across configs.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. docs/rules/named.md:3
  • Draft comment:
    The enabled/disabled config details now consistently use '❗' for flat/errors and '⌨️' for TypeScript variants. Confirm that these symbols match your intended severity levels.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. docs/rules/namespace.md:3
  • Draft comment:
    The namespace rule documentation is comprehensive and consistent with other rules. No issues noted.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. docs/rules/no-deprecated.md:1
  • Draft comment:
    This rule’s header no longer shows explicit config indicators. Confirm that the omission is intentional and that users are aware of its default behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
8. docs/rules/no-duplicates.md:3
  • Draft comment:
    The rule’s configuration details and examples are well documented. Double-check that the explanations for query string handling and inline type imports (e.g., 'prefer-inline') exactly match the implemented behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
9. docs/rules/no-named-as-default-member.md:1
  • Draft comment:
    The documentation clearly explains the behavior and provides useful examples regarding use of default exports as object properties. Looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
10. docs/rules/no-named-as-default.md:1
  • Draft comment:
    The documentation clearly outlines when using an exported name as the local default is a mistake, with examples. No changes needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
11. docs/rules/no-rename-default.md:1
  • Draft comment:
    The example clearly demonstrates the rule’s intent. Ensure that the warning messages used during linting exactly reflect those shown in the documentation.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
12. docs/rules/no-unresolved.md:3
  • Draft comment:
    The detailed configuration options (including ignore, caseSensitive, and caseSensitiveStrict) are well explained. Verify that these docs match the actual behavior on various filesystems.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
13. package.json:18
  • Draft comment:
    The exports field now uses a glob ('./': './lib/.js') to expose additional paths. Confirm that the build output includes the flat configs as intended so that ESLint’s extends (e.g. 'import-x/flat/recommended') resolve correctly.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
14. README.md:142
  • Draft comment:
    Typo: Consider using "available configurations" instead of "available configuration" since it introduces a list.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_7rpNzYTbTJH4EYJG

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

@JounQin
Copy link
Member

JounQin commented May 26, 2025

@JounQin
Copy link
Member

JounQin commented May 27, 2025

@coderabbitai full review

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (41bc731) 3625 3473 95.81%
Head commit (e5e1de5) 3626 (+1) 3474 (+1) 95.81% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#350) 3 3 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link

coderabbitai bot commented May 27, 2025

✅ Actions performed

Full review triggered.

@JounQin JounQin merged commit 12a7cda into master May 27, 2025
88 checks passed
@JounQin JounQin deleted the configs-names branch May 27, 2025 00:05
@JounQin JounQin changed the title fix: export flat configs in configs object feat: export flat configs in configs object May 27, 2025
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