eslint-plugin-import-x icon indicating copy to clipboard operation
eslint-plugin-import-x copied to clipboard

[FEAT] Add new rule `no-unused-imports`

Open ShayanTheNerd opened this issue 4 months ago • 7 comments

In VS Code, it's possible to have unused imports automatically removed when saving the file: .vscode/setting.json

{
  "editor.codeActionsOnSave": {
    "source.removeUnusedImports": "explicit"
  }
}

I think enforcing this as an autofixable ESLint rule (in a shared config, for example) would be beneficial. I'm using eslint-plugin-unused-imports for now, but I prefer not having to install another dependency just for a single rule.

ShayanTheNerd avatar Jul 18 '25 08:07 ShayanTheNerd