Questions tagged [tslint]

tslint is a static analysis linter for TypeScript.

tslint is a linter for the language, similar to jslint.

Use this tag on questions about:

  • installation
  • command-line options
  • default/built-in rules
  • rule flags
  • Custom formatters
  • creation of custom rules

Github home of tslint
NPM home of tslint

1054 questions
-2
votes
1 answer

TSLint: for statements must be braced (curly)

I want to use this code to generate String. randomString(): string { const length = 40; const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; let result = ''; for (let i = length; i > 0; --i) result +=…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
-2
votes
1 answer

How to add TSLint into TFS build

I would like to make a build fail if there is any error from TSLint. How I can integrate this into VSTS(TFS online) build?
Skorunka František
  • 5,102
  • 7
  • 44
  • 69
-2
votes
1 answer

TSLINT: Calls to '_.isNull' are not allowed

I have an Angular 2 project that uses lodash via the following import statement import * as _ from 'lodash'; I have some code that accesses the lodash isNull function onClick(){ var type = _.isNull(id) ? 'new' : 'update'; …
David Cruwys
  • 6,262
  • 12
  • 45
  • 91
-4
votes
1 answer

How to check my code style in the following way

You can help to see if you can do some code style checks such as tslint during yarn build
1 2 3
70
71