What is the default jsconfig.json or tslint.json that vscode are using to show me errors and warnings?
I would like to get all the problem in my JavaScript project. I do not have jsconfig.json
or tsconfig.json
files. I'm just using some files the //@ts-check
.
Everytime I'm open a file js
file, I see list of warnings in the problems panel. I would like to get the problems in all the files in the projects. No just the opened files. VS Studio doesn't support it, so I'm looking to do if from the CLI.
I want to get the list using a CLI. So it can be part of CI process. I have tryied to using tslint
and typescript
CLI with my custom tsconfig.json
and tslint.json
but I never got exactly the same issues and warning as the vscode show me. I believe vscode have a default tsconfig and tslint that they use for showing the information.
I didn't find this on the GitHub of the typescript language server and the repository of vscode.
In other words: I'm searching for a command that I can launch from the terminal that will give me list of all problems that vscode will show me if I will open the same file in vscode.
How to get this output using a terminal without having tsconfig or jsconfig files.
Open the JavaScript code file in Text Editor, then use shortcut Control + Alt + N (or ⌃ Control + ⌥ Option + N on macOS), or press F1 and then select/type Run Code , the code will run and the output will be shown in the Output Window.
With your project open in Visual Studio, right-click on a folder or your project node in Solution Explorer (right pane), and choose Add > New Item. In the New File dialog box, under the General category, choose the file type that you want to add, such as JavaScript File, and then choose Open.
The screenshot you provided showing that you are using the built-in Typescript comes with vscode, outputs with the ts(<code>)
abbr.
I think, (Not sure for 100%) that the config for that Built-In Typescript is composed out of many configuration options you will see when you open settings and search for: "typescript
" or expand the "Extensions > TypeScript" at the left side tree menu. I think, again: not sure, that the configurations are gathered and compiled at run time, never outputs to a file that you can capture...
The usual workflow though, is to get the official tslint
extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
Which is not the same thing as the built in one, and to get a basic tslint.js
file, matching your team taste, which you can re-use at each one of your projects, then the tsc ...
command will become part of your CI process, consuming the project's tslint.js
config file.
The new extension will also output the problems to the problems section (outputs tslint(<code>)
)
I understand that it's not exactly what you meant for, but I think it's the correct answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With