Reputation: 2804
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?
Upvotes: 7
Views: 11934
Reputation: 2804
Using the following eslint rule works:
{
"import/order": [
"error",
{
groups: [
["builtin", "external"]
],
"newlines-between": "always"
}
]
},
Upvotes: 11