Skip to content

Bug: n/no-unpublished-bin throws when bin is included #472

@cylewaitforit

Description

@cylewaitforit

Environment

Node version: >=20.19.0
npm version: 11.4.2 ( [email protected] )
ESLint version: 9.34.0
eslint-plugin-n version: 17.21.0
Operating System: linux

When the bin and files are defined as

	"bin": "bin/index.js",
	"files": [
		"lib/"
	],

n/no-unpublished-bin throws

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

What rule do you want to report?

n/no-unpublished-bin

Link to Minimal Reproducible Example

https://github.com/JoshuaKGoldberg/OctoGuide/pull/264/files

What did you expect to happen?

Removing bin/index.js from the files in package.json would not cause an error.

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

Removing bin/index.js from the files in package.json and running npm pack shows that the bin/index.js is still included.

See JoshuaKGoldberg/eslint-plugin-package-json#1246 for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions