Skip to content

Apply 'no-unnecessary-initializer' lint rule#22014

Merged
3 commits merged into
microsoft:masterfrom
JoshuaKGoldberg:no-unnecessary-initializer
Mar 6, 2018
Merged

Apply 'no-unnecessary-initializer' lint rule#22014
3 commits merged into
microsoft:masterfrom
JoshuaKGoldberg:no-unnecessary-initializer

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented Feb 17, 2018

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.

Josh Goldberg added 3 commits February 17, 2018 13:39
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.
# Conflicts:
#	src/compiler/parser.ts
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Mar 6, 2018

@Andy-MS can you please review and merge

@ghost ghost merged commit 7826b38 into microsoft:master Mar 6, 2018
@JoshuaKGoldberg JoshuaKGoldberg deleted the no-unnecessary-initializer branch March 6, 2018 15:57
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants