How to configure tsline in settings.json?

Viewed 19

I am using visual studio code

When i search for settings.json file it looks like this

{
    "liveServer.settings.donotVerifyTags": true,
    "liveServer.settings.donotShowInfoMsg": true,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "editor.insertSpaces": false,
    "editor.detectIndentation": false,
    "editor.codeActionsOnSave": {},
    "diffEditor.ignoreTrimWhitespace": false,
    "settingsSync.ignoredSettings": [
    
    ]
}

how can i configure my vs code so every time when i format my document It will use my tsline rules

for prettier i already found answer for that reference here https://stackoverflow.com/questions/49640469/how-do-you-determine-which-formatter-is-being-used-for-vs-code

but what should be the value for tsline on editor.defaultFormatter so it will use tslint ?

1 Answers

Firstly I'd like to mention that TSLint has been deprecated and all the functionality added/replaced in ESLint and I recommend you use that. Here's an article how to migrate for TSLint to ESLint (https://github.com/typescript-eslint/typescript-eslint#typescript-eslint)

  1. Download and install ESLint extension
  2. Once you've downloaded the extension, hit gear icon to go into the Extension Settings
  3. In Extension Settings you will see Eslint > Format: Enable that needs to be checked (image attached below). enter image description here
Related