At the moment, our editor Visual Studio Code does not show linting errors. It would be nice if Visual Studio Code can display these linting errors so we can fix them as we are writing code. To achieve this install Visual Studio Code extension - TSLint.
To install this extension
Once you click on the line where you see a linting error, a light bulb appears on the left margin and when you click on the light bulb you will see 1 to 3 options
You can click on the respective options
To install this extension
- Click on the "View" menu in "Visual Studio Code" and select "Extensions" from the context menu
- In the "Search Extensions in Marketplace" textbox type TSLint
- Click the "install" button
- Once installed, restart Visual Studio Code to activate TSLint
Once you click on the line where you see a linting error, a light bulb appears on the left margin and when you click on the light bulb you will see 1 to 3 options
You can click on the respective options
- To have the linting errors fixed automatically depending on whether the issue supports automatic fix or not
- To disable that specific rule
- To get documentation of the rule
- Click on the "View" menu in "Visual Studi Code" and select "Extensions" from the context menu
- In the "EXTENSIONS" window, expand "INSTALLED" section
- Click the "SETTINGS" icon against TSLint extension
- Select "Disable (Always)" option
- Restart Visual Studio Code
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.