Home > Mobile >  Is it possible to remove unused imports with Prettier?
Is it possible to remove unused imports with Prettier?

Time:06-27

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.

CodePudding user response:

I don't think this is supported by default.

But you can use this prettier-plugin https://www.npmjs.com/package/prettier-plugin-organize-imports

  • Related