Domanda

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?)
È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top