DEV Community

Cover image for Sorting your imports with ESLint

Sorting your imports with ESLint

Julio Xavier on February 14, 2022

On files that use a lot of resources, imports can become a mess. Enforcing styles and patterns can be helpful, however, doing that manually doesn't...
Collapse
 
hyphaene profile image
Maximilien Garenne •

hey.
nice article !
Small typo => yarn install eslint-plugin-simple-import-sort

Cheers

Collapse
 
thejavascriptedtale profile image
Sahil Maniyar •

Really helpful post thanks

Collapse
 
lovedeep5 profile image
lovedeep5 •

Thank you for sharing that, what if we want to do it without plugin?

Collapse
 
genuineswe profile image
genuineswe •

thank you. do you have configuration for SOLID principle?

Collapse
 
isidromar95 profile image
Isidro Martínez •

Nice, Can i add comments before each group? e.g:
//Vue

//Core

//Helpers

Collapse
 
herberthk profile image
Kavuma Herbert •

Thanks nice article

Collapse
 
gregwoods profile image
Greg Woods •

Love it, thanks.
I was kind of expecting a newline after the "react" group though. Any idea why it hasn't put one in?

Collapse
 
afcreative profile image
Adam Farhansyah •

helpful!

Collapse
 
weltkind6 profile image
Ilya •

Thanks! It's really works for me!

Collapse
 
koylyakandriy profile image
Andriy Koylyak •

Can u help me group my imports ?
stackoverflow.com/questions/742432...

Collapse
 
thekoficoud profile image
the-koficoud •

Excellent! thank you very much. Is a good tool for my OCD.