Formatting empty line between third party imports and other imports

Viewed 4552

In a react component I am importing some third party modules and other modules. Is there a way Webstorm, Prettier, Eslint or something else will check for or even format an empty line between the third party imports and the other imports?

I already found out how to sort the imports so that the third party imports are on top.

I found my answer. And now how do I insert a newline between script and asset imports?

1 Answers

Using the following eslint rule works:

{
  "import/order": [
    "error",
    {
      groups: [
        ["builtin", "external"]
      ],
      "newlines-between": "always"
    }
  ]
},
Related