Skip to content

Conversation

@trivikr
Copy link
Contributor

@trivikr trivikr commented Feb 21, 2022

What's the problem this PR addresses?

The variables target and linkType are declared as let and their values are populated in an if-else.

How did you fix it?

Change target and linkType to const, and use a conditional (ternary) operator instead.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@trivikr trivikr requested a review from larixer February 22, 2022 06:56
larixer
larixer previously approved these changes Feb 22, 2022
@trivikr trivikr changed the title refactor(nm): use const for linkType and target refactor(nm): return object with linkType and target Feb 26, 2022
@trivikr trivikr requested a review from larixer February 26, 2022 04:31
@arcanis arcanis merged commit 26beba7 into yarnpkg:master Mar 3, 2022
@trivikr trivikr deleted the trivikr/nm/const-linkType-target branch March 9, 2022 02:28
merceyz pushed a commit that referenced this pull request Oct 21, 2023
* refactor(nm): use const for linkType and target

* yarn version check --interactive

* fix: populate linkType and target as a tuple

* chore: return object containing linkType and target

(cherry picked from commit 26beba7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants