Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to remove unused imports with Prettier?

I have an Expo React Native app that has a ton of unused imports in components.

I have Prettier setup for code formatting, is it possible to configure Prettier to also remove any unused imports across the project?

I can't see anything in the docs and I don't know if there is a way to add extra eslint plugins to Prettier.

like image 397
Jamesking56 Avatar asked Sep 02 '25 09:09

Jamesking56


1 Answers

You can use VS Code .vscode/settings.json to organize imports.

"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
  "source.organizeImports": true
}
like image 148
Googlian Avatar answered Sep 03 '25 22:09

Googlian