We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
no-unpublished-bin
files
./
The no-unpublished-bin rule returns false positives when the paths of the files property (in package.json) begin with "./".
package.json
"./"
{ "name": "testcase", "version": "1.0.0", "type": "module", "private": true, "bin": "./index.js", "files": ["./index.js"], "dependencies": { "eslint": "8.42.0", "eslint-plugin-n": "16.0.0" } }
eslint.config.js
import n from "eslint-plugin-n"; export default [ { plugins: { n }, rules: { "n/no-unpublished-bin": "error" }, }, ];
index.js
console.log("Hello world");
npm install
npx eslint index.js
/home/regseb/testcase/index.js 1:1 error npm ignores 'index.js'. Check 'files' field of 'package.json' or '.npmignore' n/no-unpublished-bin ✖ 1 problem (1 error, 0 warnings)
With the value { "files": ["index.js"] }, ESLint doesn't report any errors.
{ "files": ["index.js"] }
The text was updated successfully, but these errors were encountered:
test: Add failing test for eslint-community#99 and eslint-community#122
dacbe9f
b2ad53f
I don't reproduce the problem with eslint-plugin-n 16.2.0. This pull request #123 (which fixes #122) certainly corrected the problem.
16.2.0
Sorry, something went wrong.
Thank you for testing and confirming 😀
No branches or pull requests
Description
The
no-unpublished-bin
rule returns false positives when the paths of thefiles
property (inpackage.json
) begin with"./"
.Files
package.json
eslint.config.js
index.js
To reproduce
npm install
npx eslint index.js
Additional information
With the value
{ "files": ["index.js"] }
, ESLint doesn't report any errors.The text was updated successfully, but these errors were encountered: