Search code examples
typescriptvisual-studio-codetslint

Tslint.config formatting/beautification in VS code


How to get tslint.config based formatting in VSCode. I tried some extensions and it warns me about code quality, but not format/beautify my code on save


Solution

  • There is a config option for vscode-tslint tslint.autoFixOnSave, which will run the fixes for any rules that have fixes.

    As suggested above prettier would be a better solution for formatting your code. You'll want to use tslint-config-prettier, to avoid conflicts between them. Allowing prettier to do formatting, and tslint to do any other fixes.