Skip to content

Commit

Permalink
recommend using ^react$ for sorting react to the top. (#126)
Browse files Browse the repository at this point in the history
Hi there! 

I copy and pasted this from the readme and got confused when I found
`react-query` and other `react-` imports also getting sorted to the top.
I think it would be a simple change to recommend people use `^react$`
instead of just `react` for sorting react to the top.

Also, thanks so much for this plugin. It's incredible and exactly what
I've been looking for!
  • Loading branch information
willhoney7 committed Sep 26, 2023
1 parent 95ad3a0 commit adcd95f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Here are some common ways to configure `importOrder`:
Some styles call for putting the import of `react` at the top of your imports, which you could accomplish like this:

```json
"importOrder": ["react", "<THIRD_PARTY_MODULES>", "^[.]"]
"importOrder": ["^react$", "<THIRD_PARTY_MODULES>", "^[.]"]
```

e.g.:
Expand Down

0 comments on commit adcd95f

Please sign in to comment.