-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -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'`)); |
There was a problem hiding this comment.
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.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is a roll forward of #39082, using
ts.createIdentifier(`'legacy'`)
as a cross-version compatible way of makinga 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?
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?