0.0.5 • Published 10 months ago

@briankosw/prettier-plugin-sort-imports v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@briankosw/prettier-plugin-sort-imports

A Prettier plugin that sorts your import declarations.

Setup

Install the plugin:

# Yarn
yarn add -D @briankosw/prettier-plugin-sort-imports

# npm
npm install -D @briankosw/prettier-plugin-sort-imports

Configure the plugin:

{
  "addEmptyLinesBetweenImportGroups": boolean  # default: false
  "importGroups": ["builtin", "src", "*"]      # default: ["builtin", "*"]
}

If, for whatever reason, you want the plugin to not run for a file, then add the following pragma to the file:

// @briankosw/prettier-plugin-sort-imports:disable

Currently, the plugin only supports TypeScript.

Disclaimer

This plugin modifies the AST of the passed in code, which goes against Prettier's principle of not mutating the AST.

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago

0.0.0

12 months ago