Commit graph

73 commits

Author SHA1 Message Date
Andrew Branch 7ba1c8aba2
Exclude everything in tests 2019-04-24 11:35:37 -07:00
Andrew Branch fc7b7c83b3
Exclude tests/cases from tslint 2019-04-24 10:41:17 -07:00
Ryan Cavanaugh 02a5ef6a17 Add setInterval/setTimeout 2019-02-11 11:26:19 -08:00
Ryan Cavanaugh 1f10e74abc Enable no-eval rule 2019-02-11 11:18:29 -08:00
Andy e53e56cf82
Enable '--strictNullChecks' (#22088)
* Enable '--strictNullChecks'

* Fix API baselines

* Make sys.getEnvironmentVariable non-nullable

* make properties optional instead of using `| undefined` in thier type

* reportDiagnostics should be required

* Declare firstAccessor as non-nullable

* Make `some` a type guard

* Fix `getEnvironmentVariable` definition in tests

* Pretend transformFlags are always defined

* Fix one more use of sys.getEnvironmentVariable

* `requiredResponse` accepts undefined, remove assertions

* Mark optional properties as optional instead of using `| undefined`

* Mark optional properties as optional instead of using ` | undefined`

* Remove unnecessary null assertions

* Put the bang on the declaration instead of every use

* Make `createMapFromTemplate` require a parameter

* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional

* Plumb through undefined in emitLsit and EmitExpressionList

* `ElementAccessExpression.argumentExpression` can not be `undefined`

* Add overloads for `writeTokenText`

* Make `shouldWriteSeparatingLineTerminator` argument non-nullable

* Make `synthesizedNodeStartsOnNewLine` argument required

* `PropertyAssignment.initializer` cannot be undefined

* Use one `!` at declaration site instead of on every use site

* Capture host in a constant and avoid null assertions

* Remove few more unused assertions

* Update baselines

* Use parameter defaults

* Update baselines

* Fix lint

* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions

* Make Node#symbol and Type#symbol non-optional to reduce assertions

* Make `flags` non-nullable to reduce assertions

* Convert some asserts to type guards

* Make `isNonLocalAlias` a type guard

* Add overload for `getSymbolOfNode` for `Declaration`

* Some more `getSymbolOfNode` changes

* Push undefined suppression into `typeToTypeNodeHelper`

* `NodeBuilderContext.tracker` is never `undefined`

* use `Debug.assertDefined`

* Remove unnecessary tag

* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
2018-05-22 14:46:57 -07:00
Josh Goldberg 7826b38426 Apply 'no-unnecessary-initializer' lint rule (#22014)
* Apply 'no-unnecessary-initializer' lint rule

Forbids `let`/`const` statements to be initialized to `undefined`, since that's the initial value by default anyway.
The auto-fixer also happened to remove two unnecessary `as number` casts in `src/harness/parallel/worker.ts`.

For historical data: to run with `--fix`, I modified the line in `Jakefile.js` that declared the `cmd` for running TSLint.

* Moved worker.ts type assertions to parameters
2018-03-06 07:30:40 -08:00
Andy a564912d9a
Apply 'no-unnecessary-qualifier' lint rule (#22009) 2018-03-01 14:20:18 -08:00
Andy b3edc8f9f4
Apply 'no-unnecessary-type-assertion' lint rule (#22005)
* Apply 'no-unnecessary-type-assertion' lint rule

* Fix type error

* Fix tsconfig.json

* Add --format back
2018-02-16 18:38:00 -08:00
Andy 6f2ba15446
Start linting for double spaces (#20820)
* Start linting for double spaces

* Code review

* Fix cases that were excluded by countDoubleSpaces

* Remove extraneous closing parenthesis
2018-01-08 08:52:13 -08:00
Andy b8f22f5144
Enable ban-types lint rule (#19586)
* Enable ban-types lint rule

* Improvements from code review

* More code review fixes

* Use just `void` in place of `{} | null | undefined | void`
2017-11-29 12:54:02 -08:00
Andy 2f2a82b91d
Move "space-before-function-paren" lint rule to list of rules waiting on a formatter (#19807) 2017-11-07 09:45:58 -08:00
Andy bd2e97597d
Enable 'no-empty' tslint rule (#19769)
* Enable 'no-empty' tslint rule

* Fix bug
2017-11-07 09:22:28 -08:00
Andy 9c8129eeac
Enable 'no-invalid-template-strings' lint rule (#19790) 2017-11-07 06:51:35 -08:00
Andy 77b24aec83
Apply 'unified-signatures' tslint rule (#19738)
* Apply 'unified-signatures' tslint rule

* Fix new failure
2017-11-06 18:38:03 -08:00
Andy 40efd1b3bd
Apply 'object-literal-key-quotes' tslint rule (#19737)
* Apply 'object-literal-key-quotes' tslint rule

* Convert to "consistent-as-needed"
2017-11-06 18:13:20 -08:00
Andy 3e7af1cf12
Move "ban-comma-operator" to tslint rules that we won't use (#19780) 2017-11-06 18:10:14 -08:00
Andy ed38889ca6
Enable 'no-unused-expression' tslint rule (#19734) 2017-11-06 13:01:07 -08:00
Andy 0a7b7e07ee
Apply 'variable-name' tslint rule (#19743) 2017-11-06 09:23:47 -08:00
Andy d998e97d8c
Apply 'prefer-for-of' tslint rule (#19721) 2017-11-03 15:20:35 -07:00
Andy cd9dbe694f
Enable 'only-arrow-functions' lint rule (#19717) 2017-11-03 15:08:50 -07:00
Andy ae87cd2fa9
Enable 'no-implicit-dependencies' lint rule (#19716) 2017-11-03 15:08:19 -07:00
Andy f67a9ba96e
Apply 'interface-name' lint rule (#19695) 2017-11-02 17:20:18 -07:00
Andy c70eae4993
Enable 'no-this-assignment' lint rule (#19696) 2017-11-02 17:19:50 -07:00
Andy fd41521421
Enable 'callable-types' tslint rule (#19654) 2017-11-02 17:16:09 -07:00
Andy 9b215f3a32
Extend from tslint:latest (#19309)
* Extend from tslint:latest

* Move more rules to "not doing"
2017-10-31 08:12:38 -07:00
Andy 1f282f19e0 Fix "noStringLiteral" lint errors (#19310) 2017-10-19 08:15:48 -07:00
Andy b883fcbfdd Enable "space-within-parens" lint rule (#18856) 2017-10-02 08:36:26 -07:00
Andy 25ad0b5581 Apply "array-type" lint rule (#18699) 2017-09-22 16:14:41 -07:00
Wesley Wigham 1821735136 Add custom formatter which has clickable links, reduce error duplication in gulp output (#18613) 2017-09-21 08:36:50 -07:00
Andy 193f4be355 Enable interface-over-type-literal lint rule (#17733) 2017-09-07 09:14:59 -07:00
Andy ceae613e4c Add lint rule to check that Debug.assert calls do not eagerly interpolate strings (#17125)
* And lint rule to check that `Debug.assert` calls do not eagerly interpolate strings

* Use more specific 'assert' functions to avoid callbacks

* Respond to PR feedback
2017-08-08 07:56:14 -07:00
Andy e7dc2a67ca Enable "object-literal-shorthand" lint rule (#16987) 2017-07-07 07:26:58 -07:00
TravCav b57830f7f9 enforcing curly braces (#16315) 2017-06-07 11:58:25 -07:00
Benny Neugebauer 029b67856f Sorted rules alphabetically (#16252) 2017-06-04 09:45:55 -07:00
Andy Hanson 455492d887 Merge branch 'master' into fallthrough 2017-04-18 09:48:21 -07:00
Arthur Ozga cbbf6f8847 Merge branch 'master' into tripleEquals 2017-04-17 15:57:51 -07:00
Andy Hanson a82ac45e36 Merge branch 'master' into fallthrough 2017-04-12 10:58:03 -07:00
Ryan Cavanaugh d8a24e3a5b Merge pull request #15021 from RyanCavanaugh/lintFixes
Update linting to avoid typechecking for booleanTriviaRule
2017-04-05 12:26:58 -07:00
Arthur Ozga 3bdec6943e Merge branch 'master' into tripleEquals 2017-04-05 11:51:21 -07:00
Ryan Cavanaugh e3bb5d3f28 Update linting to avoid typechecking for booleanTriviaRule 2017-04-04 22:34:51 -07:00
Arthur Ozga 7e03429a8e enforce triple-equals 2017-04-04 15:51:13 -07:00
Andy Hanson 73cab09608 Enable jsdoc-format lint rule 2017-04-03 14:39:19 -07:00
Andy Hanson 130a24015a Fix options for typedef-whitespace lint rule 2017-04-03 09:38:37 -07:00
Andy Hanson 1cf765d664 Lint for fallthrough in switch 2017-03-27 15:09:00 -07:00
Andy Hanson 2305c10a65 Fix lint errors 2017-03-17 13:54:18 -07:00
Andy Hanson d58cfa238b Merge branch 'master' into lint_better 2017-03-06 06:20:48 -08:00
Andy Hanson 8371eb6401 Update tslint to latest (next is still on 4.3) and lint for BOM 2017-03-01 10:37:13 -08:00
Andy Hanson 91421c8dbc Fix "semicolon" lint rule options (was not enabled) 2017-02-10 12:24:10 -08:00
Andy Hanson 6b1cc8972d Use native maps when they're available 2016-12-08 06:40:31 -08:00
Vladimir Matveev b15d144955 switch to tslint@next (#12201) 2016-11-13 13:34:18 -08:00