Following is an unused import
import Actions from "../Actions/ActionTypeKeys";
with tslint.json configuration:
I didn't add no-unused-variable here since it was deprecated. I instead have this option in my tsconfig.json
"noUnusedLocals": true /* Report errors on unused locals. */,
When I run tslint -p ./tsconfig.json -c ./tslint.json --fix it doesn't autofix or even report the unused import in my file. Though the VSCode editor shows this as being an unused import:

When I run tslint -p ./tsconfig.json -c ./tslint.json --fix it should auto remove the unused import.
Hi @ajain17!
I didn't add no-unused-variable here since it was deprecated. I instead have this option in my tsconfig.json
"noUnusedLocals": true /* Report errors on unused locals. */,
Yup, since you're not using the deprecated TSLint rule and relying on TypeScript's noUnusedLocals, TypeScript is what should be removing those imports. VS Code should give you a suggested action with the lightbulb to remove them:

This is powered by TypeScript, so if it's not working for you, you'll want to file an issue on them. Thanks!
@JoshuaKGoldberg the lightbulb option is there but the tslint --fix command doesn't remove the unused import. Is that the expected behavior while using the tsconfig? How can I automate removal of such unused imports then?
the tslint --fix command doesn't remove the unused import
This is good and expected. TSLint and TypeScript are two separate tools. TypeScript is the language that provides syntax & type checking, compilation, and language services; TSLint uses APIs provided by TypeScript to run additional analysis. TypeScript features such as these suggested auto-fixes are managed completely within TypeScript. TSLint doesn't have any knowledge of them: running tslint --fix just fixes _TSLint_'s detected issues, not _TypeScript_'s.
How can I automate removal of such unused imports then?
Excellent question! I don't know that such a tool exists right now (which is part of why some folks are suggesting TSLint's no-unused-variable shouldn't be deprecated: #4100).
If you're looking for a way to apply all of TypeScript's suggestions across many files automatically, that's tracked in the TypeScript repo at https://github.com/Microsoft/TypeScript/issues/19255. As of https://github.com/Microsoft/TypeScript/issues/14549 there's a way to apply all in a file, but nothing yet for applying all in _all_ files.
If you have other questions or comments on this I'm happy to chat on https://gitter.im/palantir/tslint or Twitter!
@JoshuaKGoldberg Since Microsoft/TypeScript#14549 is fixed now, there is typescript support for those auto fixing. Is there a change we could integrate it into tslint?
@scott-ho unlikely that that API would change much here. #4100's discussion is on how to enable using language service APIs altogether; the new API in that issue is another example of those.
@JoshuaKGoldberg
I agree with the other users here- the current way things are is absolutely _not good._
running ts-lint with the --fix option should remove unused imports.
@JimLynchCodes TSLint is deprecated, see #4534. Any feature requests you have for a lint rule to remove unused imports should be raised in typescript-eslint or eslint-plugin-import.
Most helpful comment
This is good and expected. TSLint and TypeScript are two separate tools. TypeScript is the language that provides syntax & type checking, compilation, and language services; TSLint uses APIs provided by TypeScript to run additional analysis. TypeScript features such as these suggested auto-fixes are managed completely within TypeScript. TSLint doesn't have any knowledge of them: running
tslint --fixjust fixes _TSLint_'s detected issues, not _TypeScript_'s.Excellent question! I don't know that such a tool exists right now (which is part of why some folks are suggesting TSLint's
no-unused-variableshouldn't be deprecated: #4100).If you're looking for a way to apply all of TypeScript's suggestions across many files automatically, that's tracked in the TypeScript repo at https://github.com/Microsoft/TypeScript/issues/19255. As of https://github.com/Microsoft/TypeScript/issues/14549 there's a way to apply all in a file, but nothing yet for applying all in _all_ files.
If you have other questions or comments on this I'm happy to chat on https://gitter.im/palantir/tslint or Twitter!