Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ For [Shareable Configs](https://eslint.org/docs/latest/developer-guide/shareable
| [no-restricted-require](docs/rules/no-restricted-require.md) | disallow specified modules when loaded by `require` | | | |
| [no-sync](docs/rules/no-sync.md) | disallow synchronous methods | | | |
| [no-top-level-await](docs/rules/no-top-level-await.md) | disallow top-level `await` in published modules | | | |
| [no-unpublished-bin](docs/rules/no-unpublished-bin.md) | disallow `bin` files that npm ignores | 🟢 ✅ | | |
| [no-unpublished-bin](docs/rules/no-unpublished-bin.md) | disallow `bin` files that npm ignores | | | |
| [no-unpublished-import](docs/rules/no-unpublished-import.md) | disallow `import` declarations which import private modules | 🟢 ✅ | | |
| [no-unpublished-require](docs/rules/no-unpublished-require.md) | disallow `require()` expressions which import private modules | 🟢 ✅ | | |
| [no-unsupported-features/es-builtins](docs/rules/no-unsupported-features/es-builtins.md) | disallow unsupported ECMAScript built-ins on the specified version | 🟢 ✅ | | |
Expand Down
16 changes: 9 additions & 7 deletions docs/rules/no-unpublished-bin.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Disallow `bin` files that npm ignores (`n/no-unpublished-bin`)

💼 This rule is enabled in the following [configs](https://github.com/eslint-community/eslint-plugin-n#-configs): 🟢 `recommended-module`, ✅ `recommended-script`.

<!-- end auto-generated rule header -->

Users can safely disable this rule if using npm v10 and later.

We can publish CLI commands by `npm`. It uses `bin` field of `package.json`.

```json
Expand All @@ -27,17 +27,19 @@ If `npm` ignores the files in `bin` field, this rule warns the files.
```json
{
"rules": {
"n/no-unpublished-bin": ["error", {
"convertPath": null
}]
"n/no-unpublished-bin": [
"error",
{
"convertPath": null
}
]
}
}
```

#### convertPath

This can be configured in the rule options or as a shared setting [`settings.convertPath`](../shared-settings.md#convertpath).
Please see the shared settings documentation for more information.
This can be configured in the rule options or as a shared setting [`settings.convertPath`](../shared-settings.md#convertpath). Please see the shared settings documentation for more information.

## 🔎 Implementation

Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-unpublished-bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
meta: {
docs: {
description: "disallow `bin` files that npm ignores",
recommended: true,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md",
},
type: "problem",
Expand Down