Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

For compability with vscode, output errors like (line, column) instead of [line, column] #2722

Closed
jonaskello opened this issue May 9, 2017 · 5 comments

Comments

@jonaskello
Copy link
Contributor

In the April 2017 (version 1.12) release of vscode it is possible to hold down CTRL and click an error message in the integrated console to go to the line of the error. See the announcement here. I think it just searches for the pattern like filename.extension(line, col).

Now this work with tsc becuase it outputs it's errors with paranthesis for the line and column like this:

src/foo.ts(69,22): error TS2304: Cannot find name 'bar'

However tslint outputs brackets instead so it does not work with vscode. Like this:

ERROR: src/foo.ts[61, 28]: Missing semicolon

I suggest that tslint use parenthesis same as tsc so it is compatible with vscode out-of-the-box.

@jonaskello
Copy link
Contributor Author

Related vscode issue.

@adidahiya
Copy link
Contributor

makes sense. this should probably be implemented as a new "vscode" formatter so that we don't break the existing formatter output (who knows what people are doing with it...)

@Tyriar
Copy link

Tyriar commented May 9, 2017

While it would be nice to have consistency with tsc and tslint, I think VS Code should probably support [line, col] microsoft/vscode#26330

@eliprand
Copy link

FWIW, the msbuild formatter (included with TSLint) does just that and is compatible with the latest release of VSCode.
Simply pass the -t msbuild argument as per the documentation.

@jonaskello
Copy link
Contributor Author

@eliprand Works like a charm! Thanks :-). @Tyriar If vscode adds support for brackets that is even better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants