Skip to content

feat(no-extraneous-dependencies): allow package to import itself #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remcohaszing
Copy link
Contributor

@remcohaszing remcohaszing commented Apr 18, 2025

Allow packages to import themselves via the package.json exports field.

If a package tries this, but the exports field is not defined, a new message is reported.

Closes #305


Important

Allow self-imports in no-extraneous-dependencies if exports field is defined in package.json, with error reporting for missing exports.

  • Behavior:
    • Allow self-imports in no-extraneous-dependencies if exports field is defined in package.json.
    • Report selfImport error if a package imports itself without exports field.
  • Code Changes:
    • Update getDependencies() in no-extraneous-dependencies.ts to include name and exports.
    • Modify reportIfMissing() to handle self-import logic.
  • Tests:
    • Add valid test case for self-import with exports in no-extraneous-dependencies.spec.ts.
    • Add invalid test case for self-import without exports in no-extraneous-dependencies.spec.ts.

This description was created by Ellipsis for 4e0dc4f. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of self-imports to allow packages to import themselves only if their package.json defines an exports field.
  • Tests
    • Added new test cases to verify correct behavior for self-imports with and without the exports field.
  • Chores
    • Introduced new fixture files to support expanded test coverage for package-named exports.

Allow packages to import themselves via the `package.json` exports
field.

If a package tries this, but the exports field is not defined, a new
message is reported.

Closes un-ts#305
Copy link

changeset-bot bot commented Apr 18, 2025

🦋 Changeset detected

Latest commit: 4e0dc4f

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

Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

This change updates the import-x/no-extraneous-dependencies ESLint rule to refine how self-imports are handled. The rule now allows a package to import itself only if its package.json includes an exports field. The logic for extracting dependency information is expanded to consider the name and exports fields from package.json. New test cases are added to verify the updated behavior, including scenarios where self-imports are permitted or disallowed based on the presence of the exports field.

Changes

File(s) Change Summary
src/rules/no-extraneous-dependencies.ts Enhanced dependency extraction to include name and exports from package.json. Updated self-import logic and error reporting. Added new message ID for self-import violations.
test/rules/no-extraneous-dependencies.spec.ts Added tests for self-imports, covering both allowed (with exports) and disallowed (without exports) cases.
test/fixtures/package-named-exports/index.js
test/fixtures/package-named-exports/package.json
Introduced a new fixture package with an exports field and a default export for test coverage.
.changeset/cruel-cooks-notice.md Added a changeset entry describing the update to the self-import rule.

Sequence Diagram(s)

sequenceDiagram
    participant ESLintRule as no-extraneous-dependencies
    participant PackageJson as package.json
    participant ImportStatement as Import Statement

    ImportStatement->>ESLintRule: import { foo } from "package-name"
    ESLintRule->>PackageJson: Read name and exports fields
    alt Package name matches import & exports field exists
        ESLintRule-->>ImportStatement: Allow import (no error)
    else Package name matches import & no exports field
        ESLintRule-->>ImportStatement: Report selfImport error
    else Import is not self-import
        ESLintRule-->>ImportStatement: Perform standard dependency check
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Do not report self-imports in no-extraneous-dependencies rule (#305) Self-imports are only allowed if the exports field exists, which is stricter than required.

Poem

A bunny hopped through package land,
With exports in its gentle hand.
"Self-imports now are mostly fine—
Just add 'exports' and you’ll align!
But if you miss that special key,
The rule will scold you, can't you see?
Hop on, dear dev, with code so neat,
Your dependencies now are quite complete!"

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/rules/no-extraneous-dependencies.ts

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js
at finalizeResolution (node:internal/modules/esm/resolve:257:11)
at moduleResolve (node:internal/modules/esm/resolve:914:10)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)
(node:19713) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)

test/rules/no-extraneous-dependencies.spec.ts

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js
at finalizeResolution (node:internal/modules/esm/resolve:257:11)
at moduleResolve (node:internal/modules/esm/resolve:914:10)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)
(node:19731) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)

test/fixtures/package-named-exports/index.js

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js
at finalizeResolution (node:internal/modules/esm/resolve:257:11)
at moduleResolve (node:internal/modules/esm/resolve:914:10)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)
(node:19729) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 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 335d9f5 and 4e0dc4f.

⛔ Files ignored due to path filters (4)
  • test/fixtures/package-named-exports/node_modules/package-named-exports/index.js is excluded by !**/node_modules/**
  • test/fixtures/package-named-exports/node_modules/package-named-exports/package.json is excluded by !**/node_modules/**
  • test/fixtures/package-named/node_modules/package-named/index.js is excluded by !**/node_modules/**
  • test/fixtures/package-named/node_modules/package-named/package.json is excluded by !**/node_modules/**
📒 Files selected for processing (5)
  • .changeset/cruel-cooks-notice.md (1 hunks)
  • src/rules/no-extraneous-dependencies.ts (7 hunks)
  • test/fixtures/package-named-exports/index.js (1 hunks)
  • test/fixtures/package-named-exports/package.json (1 hunks)
  • test/rules/no-extraneous-dependencies.spec.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
test/rules/no-extraneous-dependencies.spec.ts (1)
test/utils.ts (1)
  • testFilePath (39-41)
⏰ Context from checks skipped due to timeout of 90000ms (21)
  • GitHub Check: autofix
  • 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 9 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 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 20 and ESLint 8.56 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 18 and ESLint 8 on windows-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 windows-latest
  • GitHub Check: Lint and Test with Node.js 22 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 22 and ESLint 8 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 22 and ESLint 8.56 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 and ESLint 9 on ubuntu-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 8.56 on macos-latest
  • GitHub Check: publish
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (12)
test/fixtures/package-named-exports/index.js (1)

1-1: Simple dummy export function looks good.

This is a minimal module export that will be used for testing the self-import functionality with the exports field in package.json.

src/rules/no-extraneous-dependencies.ts (7)

44-45: Good addition of name and exports fields to dependency extraction.

These fields are necessary to identify the package itself and determine if it can import itself.


74-76: Correct initialization of new fields.

The name and exports fields are properly initialized as undefined in the initial packageContent object.


98-101: Appropriate handling of new fields when merging package content.

The code correctly assigns the name and exports fields only if they haven't been set yet, preventing overrides from multiple package.json files.


137-149: Good update to presence check for dependency data.

The condition now correctly considers name and exports as meaningful data that should be preserved when determining if dependency data exists.


328-340: Core logic for allowing self-imports with exports field.

This is the key implementation that allows packages to import themselves only if they define an exports field. It prevents further checks once the self-import case is handled.


403-403: Added new message ID for self-import rule.

This correctly adds a new message ID for the self-import error case.


438-440: Clear error message for self-imports without exports field.

The error message provides clear guidance about what is required for self-imports to be valid.

.changeset/cruel-cooks-notice.md (1)

1-5: Clear and concise changeset description.

The changeset correctly describes the patch that allows packages to import themselves if the exports field is defined in package.json.

test/fixtures/package-named-exports/package.json (1)

1-5: Good test fixture with required fields.

This package.json correctly defines a name and exports field, which is essential for testing the new self-import validation logic.

test/rules/no-extraneous-dependencies.spec.ts (2)

241-245: Test case correctly validates self-import with exports field.

The test case properly verifies that a package can import itself when it has an exports field defined in its package.json. This aligns with the PR objective of allowing packages to import themselves using the package.json exports field.


454-461: Test case correctly validates self-import error.

This test case properly checks that a package importing itself without an exports field in its package.json triggers the appropriate error. The error message uses the new selfImport message ID, which matches the PR objectives.

✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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

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

❌ Changes requested. Reviewed everything up to 4e0dc4f in 1 minute and 59 seconds

More details
  • Looked at 215 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. src/rules/no-extraneous-dependencies.ts:71
  • Draft comment:
    Initializing packageContent with 'name' and 'exports' properties set to undefined is clear. Consider adding a comment explaining that these fields are merged only once from the first package.json to avoid later overwrites.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. src/rules/no-extraneous-dependencies.ts:328
  • Draft comment:
    Self-import block: verifies if a package imports itself and reports an error if the 'exports' field is missing. The implementation meets the issue requirements. A short inline comment might help clarify the intention.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
3. .changeset/cruel-cooks-notice.md:5
  • Draft comment:
    The changeset notice refers to import-x/no-extraneous-imports but the actual rule is named no-extraneous-dependencies. Please update the notice for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    Without seeing the actual ESLint plugin code or documentation, I cannot verify if the rule is actually named 'no-extraneous-dependencies'. The changeset is introducing a new feature for a rule named 'import-x/no-extraneous-imports', and we should assume the author knows the correct name of their own rule. The comment makes an assertion without providing evidence.
    I could be wrong if there's established naming conventions for ESLint rules that I'm not aware of, or if there's documentation elsewhere showing the correct rule name.
    Even if there are conventions, we need clear evidence that the current name is wrong. Without such evidence, we should trust the author's knowledge of their own codebase.
    Delete this comment as it makes an assertion about the rule name being wrong without providing any evidence to support the claim.
4. src/rules/no-extraneous-dependencies.ts:44
  • Draft comment:
    Good job adding name and exports to the extracted package fields. This extension is key for handling self-imports.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
5. src/rules/no-extraneous-dependencies.ts:97
  • Draft comment:
    Merging the package’s name and exports from the first package.json is reasonable, but note that when multiple packageDirs are provided, only the first one’s name/exports is used. Ensure this merging behavior is as intended.
  • 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 ensure that the merging behavior is intended, which violates the rule against asking for confirmation of intention. It does not provide a specific suggestion or point out a clear issue with the code.
6. src/rules/no-extraneous-dependencies.ts:329
  • Draft comment:
    The new self-import check is clear: if the imported package name matches the package’s own name and the exports field is missing, a 'selfImport' error is reported. This meets the requirements.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
7. test/rules/no-extraneous-dependencies.spec.ts:317
  • Draft comment:
    There's a potential typo in the filename 'foo.tes.js' used in the tInvalid test cases (e.g., at line 317). Did you mean 'foo.test.js'? Please verify if this was intentional.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_y4n7hpxvA0T9NPK8


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

packageContent.peerDependencies,
packageContent_.peerDependencies,
)
Object.assign(
Copy link

Choose a reason for hiding this comment

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

Merging bundledDependencies using Object.assign may not properly concatenate arrays if multiple package.json files provide them. Consider whether concatenating arrays (e.g. using array spread or concat) might be more appropriate here.

Copy link
Member

@JounQin JounQin May 8, 2025

Choose a reason for hiding this comment

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

Personally I don't like current refactor, it's too verbose to me, only name and exports are special.

@remcohaszing Could you revert it back to previous style? So that I can merge this PR as-is.

Copy link

pkg-pr-new bot commented Apr 18, 2025

Open in StackBlitz

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

commit: 4e0dc4f

Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.00%. Comparing base (335d9f5) to head (4e0dc4f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #309      +/-   ##
==========================================
+ Coverage   95.99%   96.00%   +0.01%     
==========================================
  Files          91       91              
  Lines        4744     4756      +12     
  Branches     1785     1791       +6     
==========================================
+ Hits         4554     4566      +12     
  Misses        189      189              
  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.

@@ -297,6 +325,20 @@ function reportIfMissing(
return
}

if (importPackageName === deps.name) {
if (!deps.exports) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure to understand why exports field is required, and is this prevents self-importing issues in source files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don’t know the rationale behind that decision, but that is how Node.js behaves. You can try it by creating a directory with two files:

package.json:

{
  "name": "pkg",
  "exports": "./index.js"
}

index.js:

require('pkg')

console.log('Hello')

If you run index.js, this logs:

$ node index.js
Hello

If you now remove the exports field, or change it to main, this logs:

$ node index.js 
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'pkg'
Require stack:
- /home/remco/Downloads/asd/index.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function._load (node:internal/modules/cjs/loader:1055:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Module.require (node:internal/modules/cjs/loader:1311:12)
    at require (node:internal/modules/helpers:136:16)
    at Object.<anonymous> (/home/remco/Downloads/asd/index.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/remco/Downloads/asd/index.js' ]
}

Node.js v22.14.0

Copy link
Member

Choose a reason for hiding this comment

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

Even if it works for self-importing, but I personally still believe it's not a good practice to do like this as circular dependency itself. It should only be allowed in non-source files IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This example is indeed circular, which is a bit silly. This was to keep it minimal. Modules can resolve package-local modules using package.json exports. Tests are one useful example, but I can think of other use cases.

The goal of this PR however is not to discuss whether or not people should do this or when. People can do it. The concept of what a source file is also varies per project. The goal of this PR is to fix a false positives for detecting imports of extraneous modules.

Copy link
Member

@JounQin JounQin Apr 18, 2025

Choose a reason for hiding this comment

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

People can do anything they want without enabling this rule, the ESLint rules are for good practice, not how codes can be used in runtime. Otherwise, running the codes itself already helps you confirming it's working.

But I'd like to hear more voices from @thepassle @SukkaW @Shinigami92 @43081j

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, to summary, import/require via package's own exports is supported by Node, main is not, right?

Correct!

Copy link
Member

@JounQin JounQin May 8, 2025

Choose a reason for hiding this comment

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

@remcohaszing Would you like to combine your proposed import-x/no-own-exports rule into this PR together? Or maybe wait for other reviewers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That rule seems unrelated to these changes TBH. Also I don’t have personal interest in that rule.

Copy link
Member

Choose a reason for hiding this comment

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

Well, that rule should be added together with this behavior change IMO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That makes sense to me

We can probably merge this one first @JounQin and one of us can work on the new rule separately.

It looks like this won't change existing behaviour other than making this edge case work. So should be an easy one to land

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.

no-extraneous-dependencies should not report the package itself
3 participants