mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-28 08:00:55 -05:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user