-2

I try to validate some server side javascript with JSHint. Everything looks great so far, but i got problems with a syntax like this

var foo:type = bar;

The message is

Missing semicolon.

Expected '(end)' and instead saw ':'.

Is there any way to allow it?

Community
  • 1
  • 1
Pudelduscher
  • 359
  • 3
  • 18

1 Answers1

0

JSHint says it is not valid JavaScript, which is true. You can suppress different warnings about coding style, but it does not (and really, should not) allow blatantly wrong code.

Anyway, you should try tslint. It was designed for TypeScript.

meskobalazs
  • 15,741
  • 2
  • 40
  • 63