Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explaining TypeScript Linter Errors

Tags:

typescript

The web essentials plugin for visual studio 2013 comes with a linter for typescript. I get hundreds of messages now, but I have no idea what some of them mean.

Is there a place where every tslint error is explained? (a sort of tslint wiki?) I tried googling them, but I don't get any explanation.

Errors:

  • TsLint: expected callSignature to have a typedef.
  • TsLint: missing 'use strict' (I have a 'use strict' at the top of the file, which triggers the next error)
  • TsLint: expected an assignment or function call (at 'use strict';)

and then there are some really weird ones:

  • TsLint: comment must start with a space (really? why?)
like image 896
user886079 Avatar asked Apr 19 '14 16:04

user886079


1 Answers

sort of tslint wiki?

Unfortunately no. But a short description ins present here https://github.com/palantir/tslint#supported-rules

Many of these are from jslint so this should help http://jslinterrors.com/

TsLint: comment must start with a space (really? why?)

It is a coding convention to make comments visually pleasing. // comment Is much easier to read than //comment. Visual aesthetics become important in large teams.

like image 143
basarat Avatar answered Oct 08 '22 21:10

basarat