# prettier-plugin-import-sort-regex

> Prettier plugin using import-sort to organize by regular expressions.

Latest version **1.0.0** (published 2021-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install prettier-plugin-import-sort-regex
pnpm add prettier-plugin-import-sort-regex
yarn add prettier-plugin-import-sort-regex
bun add prettier-plugin-import-sort-regex
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-01-28 |
| First published | 2021-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | DevJWN |
| Maintainers | dev.jwn |
| Keywords | prettier, plugin, import, sort, regex |

## Links

- npm: https://www.npmjs.com/package/prettier-plugin-import-sort-regex
- Repository: https://github.com/DevJWN/prettier-plugin-import-sort-regex
- Homepage: https://github.com/DevJWN/prettier-plugin-import-sort-regex#readme
- Issues: https://github.com/DevJWN/prettier-plugin-import-sort-regex/issues
- npm.io page: https://npm.io/package/prettier-plugin-import-sort-regex

## Dependencies (3)

- [import-sort](https://npm.io/package/import-sort.md) ^6.0.0
- [import-sort-parser-babylon](https://npm.io/package/import-sort-parser-babylon.md) ^6.0.0
- [import-sort-parser-typescript](https://npm.io/package/import-sort-parser-typescript.md) ^6.0.0

## 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

- 1.0.0 (latest) — 2021-01-28

## README

# prettier-plugin-import-sort-regex

Prettier plugin using [import-sort](https://www.npmjs.com/package/import-sort) to organize by regular expressions.

## Usage

### **Installation**

#### _With npm_:

```
 npm i -D prettier-plugin-import-sort-regex
```

#### _With yarn_:

```
yarn add -D prettier-plugin-import-sort-regex
```

### Customization

Add the `importSortGroups` key to your prettier configuration (eg. in `.prettierrc.json`, `.prettierrc.js`, etc.) with a string array of regex patterns. An empty string `""` will insert a separator line between entries. The regex pattern will match against the import package name.

#### _Example_:

```json
{
  "importSortGroups": [
    "^react$",
    "",
    "^(?:_|clsx|fs|lodash/?.*|path)$",
    "",
    "^@?[\\w\\-]+",
    "",
    "^\\./[\\w\\-]+$",
    "",
    "^\\.\\?./",
    "",
    "\\.json$",
    "",
    "\\.s?css$"
  ]
}
```

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