0.0.5 • Published 2 years ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago