vscode-tslint | A tslint integration for vscode
kandi X-RAY | vscode-tslint Summary
kandi X-RAY | vscode-tslint Summary
A tslint integration for vscode
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vscode-tslint
vscode-tslint Key Features
vscode-tslint Examples and Code Snippets
Community Discussions
Trending Discussions on vscode-tslint
QUESTION
Is it possible to configure VSCode so that it displays unused import as grayed? I have VSCode 1.21.0, using Typescript 2.7.2
I found and tried several setups but none worked for me. Based on this link it should have been possible since version 1.19.0
I tried setting tsconfig as described here but the only effect was lots of error during compilation.
It seems to be so basic requirement that I would even consider it as default setting. It is definitely possible in other editors (e.g. WebStorm). I love VSCode but I'm really missing this feature.
...ANSWER
Answered 2018-Mar-13 at 14:23I think you need to wait for some time since they have a plan to release this soon.
Checkout this link Suggestion: Show unused imports in VS Code Editor as grayed #8165
QUESTION
I loaded an angular project in ItelliJ and all the files have some code underlined in red. The same red colour is on the scrollbar on the right. It seems the code is full of errors, but they are just missing spaces or things like that; the project is correctly builded. Even comments that don't have a space after the // get underlined in red.
The responsible is TSLint.
This distracts me; I would like to have underlined code only for "real" problems, and maybe yellow suggestion on the left (and not in scrollbar) for missing spaces in comments or import.
I found this (here https://github.com/Microsoft/vscode-tslint/issues/199)
tslint.alwaysShowRuleFailuresAsWarnings
but it's in visualStudio and I don't know where to add this option in intelliJ.
Do you know how to disable this red underlining?
Also another question, if I would disable TSLint, do I loose anything except formatting? I like to have a well-formatted code, but from the IntelliJ environment I would like to have mostly the syntax errors rather than formatting, at least not in real time (maybe i can run to check the code formatting when I want, as I did until now).
Here the screenshot as requested by the first answer. The settings are ignored, maybe there is a problem in my computer... (TLSint is 5.0.0 by the way)
...ANSWER
Answered 2019-May-21 at 10:12The editor highlights the errors according to the severity levels specified in the TSLint configuration files by default. You can either set warn
as defaultSeverity ({"defaultSeverity": "warn"}
) in your tslint.json
or override it with a specific severity in IDE settings (Settings | Editor | Inspections | TypeScript | TSLint): uncheck Use rule severity from the configuration file to use the inspection severity for all linter rules:
if I would disable TSLint, do I loose anything except formatting
If you are mostly interested in syntax errors, you can safely disable TSLint
QUESTION
I'm using WebStorm 2019.1
I've generated a project using the Angular CLI.
Everything works fine but I have one or two .js files in my project - e.g. protractor.conf.js
Within the IDE, TSLint is linting the .js files and showing loads of red. But I don't want TSLint to lint the .js files.
I know I could disable TSLint for this file but I'd rather configure my project correctly by doing this via tsconfig.json
or tslint.json
or if all else fails via WebStorm settings.
I've tried "tslint.jsEnable": false
as described here - https://github.com/Microsoft/vscode-tslint/issues/261 - but I think this is for a different IDE. Any ideas how to do this via tsconfig.json
or tslint.json
or failing that via WebStorm settings?
ANSWER
Answered 2019-Apr-03 at 12:00Since 2019.1 .js
files are linted if jsRules
is present in tslint.json
(WEB-36890). You can add .js
files to "exclude":
option in tslint.json
if you don't want them to be linted:
QUESTION
When I'm trying to lint my angular legacy app via VS Code TsLint extension (runtime linting), unfortunately extension fails.
At startup we have following version set:
...ANSWER
Answered 2018-Sep-05 at 13:21I ran to same issue today and it seems like dependencies for vscode-tslint have been updated.
I had to upgrade to:
QUESTION
I'm using Visual Studio Code on my computer to develop a project (angular). The files of my project are located on a virtual machine.
Visual Studio Code works fine, I can edit my files without any problem but I can't see tslint errors. I would like to fix all tslint error I see by using "ng lint" command on my VM (via Putty) in Visual Studio Code.
When I'm trying to launch commands into the Visual Studio Code terminal, I've got errors :
...ANSWER
Answered 2018-Aug-01 at 13:59The path is not good, where can I change this ?
Try changing the tslint.configFile
Visual Studio Code setting. You can find it by going to File -> Preferences -> Settings and typing the name in the search box.
QUESTION
I made a change to a file for Definitely Typed, and when I created a pull request, it failed because of a formatting error. I'm assuming this is TsLint. I've never set it up before. How do I get it setup locally so I can catch these errors before committing using VSCode?
Currently I've installed TSLint Globally:
npm install -g tslint typescript
and I've installed the TSLint extension... but I don't see any errors show up when I save my file. Do I need to tell it to start working?
I'm new to VSCode and TSLint and Node, so the more specific, the better.
UpdateI am seeing this error now:
...vscode-tslint: Cannot read tslint configuration - 'Failed to load c:\Users\dlabar\Documents\GitHub\DefinitelyTyped\types\xrm\tslint.json: Invalid "extends" configuration value - could not require "dtslint/dt.json". Review the Node lookup algorithm (https://nodejs.org/api/modules.html#modules_all_together) for the approximate method TSLint uses to find the referenced configuration file.'
ANSWER
Answered 2017-May-05 at 17:54Apparently node 7+ is required: https://github.com/Microsoft/dtslint/issues/29
Upgraded and everything worked.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vscode-tslint
open VS Code on tslint and tslint-server or open a workspace with the client and server by opening vscode-tslint.code-workspace
compile the server once (see developing the server)
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page