# plugin-name-to-package-name

> Utility to transform plugin names into package names as seen at e.g. eslint, stricter, and others

Latest version **0.1.1** (published 2020-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install plugin-name-to-package-name
pnpm add plugin-name-to-package-name
yarn add plugin-name-to-package-name
bun add plugin-name-to-package-name
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2020-05-03 |
| First published | 2020-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hannes Obweger |
| Maintainers | obweger |
| Keywords | plugin, package, eslint |

## Links

- npm: https://www.npmjs.com/package/plugin-name-to-package-name
- Repository: https://github.com/obweger/plugin-name-to-package-name
- Homepage: https://github.com/obweger/plugin-name-to-package-name#readme
- Issues: https://github.com/obweger/plugin-name-to-package-name/issues
- npm.io page: https://npm.io/package/plugin-name-to-package-name

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2020-05-03
- 0.1.0 — 2020-05-03

## README

# plugin-name-to-package-name

Transforms plugin names into package names, as seen at e.g. [`eslint`](https://eslint.org/), [`stricter`](https://github.com/atlassian/stricter), and others.

From `eslint`'s [Working with Plugins](https://eslint.org/docs/developer-guide/working-with-plugins):

> Each plugin is an npm module with a name in the format of `eslint-plugin-<plugin-name>`, such as `eslint-plugin-jquery`. You can also use scoped packages in the format of `@<scope>/eslint-plugin-<plugin-name>` such as `@jquery/eslint-plugin-jquery` or even `@<scope>/eslint-plugin` such as `@jquery/eslint-plugin`.

## Installation

```shell
$ npm install plugin-name-to-package-name
```

```js
const { transform } = require('plugin-name-to-package-name');

console.log(transform('@foo/bar', 'eslint-plugin')); // @foo/eslint-plugin-bar
```

## Usage

`transform` takes two parameters; the `pluginName`, and the `pluginPrefix`. In the above example, `pluginName` is `'@foo/bar'` and `pluginPrefix` is `'eslint-plugin'`.

### Examples

| `pluginName` | `pluginPrefix` | Result |
|-|-|-|
| `@foo` | `eslint-plugin` | `@foo/eslint-plugin` |
| `bar` | `stricter-plugin` | `stricter-plugin-bar` |
| `@foo/bar` | `modster-plugin` | `@foo/modster-plugin-bar` | 


## Contributions

Yes please!

---
_Source: https://npm.io/package/plugin-name-to-package-name · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
