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

changed replace to replaceAll on schema #1099

Conversation

msivasubramaniaan
Copy link
Contributor

What does this PR do?

Updated eslint version to support replaceAll method

What issues does this PR fix or reference?

#1078

Is it tested? How?

Existing test case

Signed-off-by: msivasubramaniaan <[email protected]>
Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

I think the title here is misleading. You aren't updating eslint. What you're updating is the JavaScript version that the TypeScript compiler will let you use methods from and the JavaScript version of the code that the TypeScript compiler generates. This change is needed because replaceAll was introduced in the ECMAScript 2021 specification. (es6 was released in 2015, before the versions were labelled by the year they were released).

I think the title of this PR should mention the change from replace -> replaceAll instead.

Other than that, the PR seems good.

@msivasubramaniaan msivasubramaniaan changed the title updated eslint version changed replace to replaceAll on schema Mar 3, 2025
Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks Muthu!

@msivasubramaniaan msivasubramaniaan merged commit 7006161 into main Mar 3, 2025
0 of 3 checks passed
@msivasubramaniaan msivasubramaniaan deleted the 1078-use-replaceall-instead-of-replace-when-turning-a-label-into-a-regex branch March 3, 2025 14:14
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.

use replaceAll() instead of replace() when turning a label into a regex
2 participants