Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trivago/prettier-plugin-sort-imports

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trivago/prettier-plugin-sort-imports - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

package.json
{
"name": "@trivago/prettier-plugin-sort-imports",
"version": "1.0.0",
"version": "1.0.1",
"description": "A prettier plugins to sort imports in provided RegEx order",
"main": "lib/src/index.js",
"repository": {
"url": "https://github.com/trivago/prettier-plugin-sort-imports",
"type": "git"
},
"homepage": "https://github.com/trivago/prettier-plugin-sort-imports#readme",
"scripts": {

@@ -7,0 +12,0 @@ "compile": "tsc",

8

README.md

@@ -31,3 +31,3 @@ # Prettier plugin sort imports

"semi": true,
"importOrder": ["^@core/(.*)$", "^@server/(.*)", "^@ui/(.*)$", "^[./]"],
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
}

@@ -41,3 +41,3 @@ ```

to evaluate RegEx. E.g. `node.source.value.match(new RegExp(val))` Here, `val`
is the string provide in import order.
is the string provided in import order.

@@ -58,3 +58,3 @@

##### Q. Hoe can I add the RegEx imports in the `importOrder` list ?
##### Q. How can I add the RegEx imports in the `importOrder` list ?
You can define the RegEx in the `importOrder`. For

@@ -71,3 +71,3 @@ example if you want to sort the following imports:

```
then the `importOrder` would be `["^@ui/(.*)$","^@server/(.*)", '^[./]']`.
then the `importOrder` would be `["^@ui/(.*)$","^@server/(.*)$", '^[./]']`.
Now, the final output would be as follows:

@@ -74,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc