mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -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:
@@ -674,7 +674,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// string is for exact match
|
||||
let matchedPattern: Pattern | string | undefined = undefined;
|
||||
let matchedPattern: Pattern | string | undefined;
|
||||
if (state.compilerOptions.paths) {
|
||||
if (state.traceEnabled) {
|
||||
trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);
|
||||
|
||||
Reference in New Issue
Block a user