Skip to content

🐛 Bug: no-redundant-files conflicts with n/no-unpublished-bin #1246

@cylewaitforit

Description

@cylewaitforit

Bug Report Checklist

Expected

When upgrading to 0.56.0 in which no-redundant-files is a part of the recommended config the no-redundant-files rule flagged "bin/index.js", in the package.json as redundant. Removing it should result in lint passing.

Actual

After removing "bin/index.js", in the package.json files, the no-unpublished-bin rule from eslint-plugin-n throws

error  npm ignores 'bin/index.js'. Check 'files' field of 'package.json' or '.npmignore'  n/no-unpublished-bin

Version

0.56.0

ESLint Version

9.34.0

Additional Info

"eslint-plugin-n": "17.21.0"

The no-unpublished-bin documentation states:

If npm ignores the files in bin field, this rule warns the files.

  • If files field does not includes the files in bin field.

I don't know which rule is correct. Filing the issue here first because enabling this rule is how the discrepancy was found.

You can recreate this in octoguide/bot#260.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot yet ready for implementation or a pull requesttype: bugSomething isn't working 🐛

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions