{"repo":"trivago/prettier-plugin-sort-imports","free":true,"listed":false,"github":"https://github.com/trivago/prettier-plugin-sort-imports","clone":"git clone https://github.com/trivago/prettier-plugin-sort-imports.git","description":"A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.","language":"TypeScript","stars":3947,"topics":["prettier","prettierrc","typescript","import","sort","plugin","javascript","opensource","hacktoberfest"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"Prettier plugin sort imports A prettier plugin to sort import declarations by provided Regular Expression order. Note: If you are migrating from v2.x.x to v3.x.x, Please Read Migration Guidelines Input Output Install using npm using yarn using pnpm Note: If you are migrating from v2.x.x to v3.x.x, Please Read Migration Guidelines Note: If formatting .vue sfc files please install @vue/compiler-sfc if not in your dependency tree - this normally is within Vue projects. Usage Add an order in prettier config file. Note: There may be an issue with some package managers, such as pnpm or when using prettier v3.x. You can solve it by providing additional configuration option in prettier config file. APIs importOrder type : Array A collection of Regular expressions in string format. Default behavior: The plugin moves the third party imports to the top which are not part of the importOrder list. To move the third party imports at desired place, you can use to assign third party imports to the appropriate position: You can also use to control the position of Node.js builtin modules (like fs , path , http , and their node: prefixed variants): When is included in your importOrder , Node.js builtin modules will be sorted to that position. If not included, builtin modules are treated as regular third-party imports. importOrderSeparation type : boolean default value : false A boolean value to enable or disable the new line separation between sorted import declarations group. The separation ta","default_branch":null,"files":null,"tree":[],"storefront":"/r/trivago","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/trivago/prettier-plugin-sort-imports/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}