Skip to content

Commit

Permalink
Add example of sorting for built-in node types (#155)
Browse files Browse the repository at this point in the history
Closes #141
  • Loading branch information
IanVS committed Mar 12, 2024
1 parent 6d71e9e commit 03b05ff
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,17 @@ import MyApp from './MyApp';

##### 4. Group type imports separately from values

If you're using Flow or TypeScript, you might want to separate out your type imports from imports of values. And to be especially fancy, you can even group 3rd party types together, and your own local type imports separately:
If you're using Flow or TypeScript, you might want to separate out your type imports from imports of values. And to be especially fancy, you can even group built-in types (if you're using `node:` imports), 3rd party types, and your own local type imports separately:

```json
"importOrder": ["<TYPES>", "<TYPES>^[.]", "<THIRD_PARTY_MODULES>", "^[.]"]
"importOrder": [
"<TYPES>^(node:)",
"<TYPES>",
"<TYPES>^[.]",
"<BUILT_IN_MODULES>",
"<THIRD_PARTY_MODULES>",
"^[.]"
]
```

e.g.:
Expand Down

0 comments on commit 03b05ff

Please sign in to comment.