Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): migrate relative link resolution with single quotes #39102

Closed
wants to merge 1 commit into from

Conversation

dgp1130
Copy link
Contributor

@dgp1130 dgp1130 commented Oct 2, 2020

This is a roll forward of #39082, using ts.createIdentifier(`'legacy'`) as a cross-version compatible way of making
a single quoted string literal.

Migrated code now uses single quotes, which is in line with the default linting options, so there is no lint error after
migration.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Migrating code for legacy relative link resolution generates double quotes, which is against the default style guide and leads to a lint warning in the CLI. This is also a CI failure in the CLI repo.

Issue Number: N/A

What is the new behavior?

Migrating code for legacy relative link resolution now generates single quotes, which is in line with the style guide and no longer generates a lint warning.

Does this PR introduce a breaking change?

  • No

This is a roll forward of angular#39082, using `ts.createIdentifier(`'legacy'`)` as a cross-version compatible way of making
a single quoted string literal.

Migrated code now uses single quotes, which is in line with the default linting options, so there is no lint error after
migration.
@dgp1130 dgp1130 added target: major This PR is targeted for the next major release area: migrations Issues related to `ng update` migrations labels Oct 2, 2020
@dgp1130 dgp1130 requested review from atscott and alxhub October 2, 2020 22:09
@ngbot ngbot bot added this to the needsTriage milestone Oct 2, 2020
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan-agius4 alan-agius4 removed the request for review from alxhub October 8, 2020 09:46
@alan-agius4 alan-agius4 added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 8, 2020
@ngbot ngbot bot added the action: merge The PR is ready for merge by the caretaker label Oct 8, 2020
@alan-agius4 alan-agius4 removed the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 8, 2020
@@ -45,7 +45,7 @@ export class RelativeLinkResolutionTransform {
return literal;
}
const legacyExpression =
ts.createPropertyAssignment(RELATIVE_LINK_RESOLUTION, ts.createStringLiteral('legacy'));
ts.createPropertyAssignment(RELATIVE_LINK_RESOLUTION, ts.createIdentifier(`'legacy'`));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it might be a good idea to leave a comment about why we use createIdentifier here.

@atscott atscott closed this in 049b453 Oct 8, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 8, 2020
@dgp1130 dgp1130 deleted the lint-quotes branch May 26, 2021 18:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: migrations Issues related to `ng update` migrations cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants