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
This commit is contained in:
Josh Goldberg
2018-03-06 07:30:40 -08:00
committed by Andy
parent 5e593acad9
commit 7826b38426
18 changed files with 50 additions and 51 deletions

View File

@@ -104,7 +104,6 @@
"no-object-literal-type-assertion": false,
"no-shadowed-variable": false,
"no-submodule-imports": false,
"no-unnecessary-initializer": false,
"no-var-requires": false,
"ordered-imports": false,
"prefer-conditional-expression": false,