-
Notifications
You must be signed in to change notification settings - Fork 552
deps: replace tslint with typescript-eslint #2162
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
Conversation
tslint has been deprecated. This commit replaces it with typescript-eslint.
@@ -8,7 +8,7 @@ export async function podsForNode(api: CoreV1Api, nodeName: string): Promise<V1P | |||
|
|||
export function findSuffix(quantity: string): string { | |||
let ix = quantity.length - 1; | |||
while (ix >= 0 && !/[\.0-9]/.test(quantity.charAt(ix))) { | |||
while (ix >= 0 && !/[.0-9]/.test(quantity.charAt(ix))) { |
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.
I think this is a breaking change we want the escaped \.
to just match vs in regexp which matches all characters?
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.
That change was related to this error:
11:26 error Unnecessary escape character: . no-useless-escape
Here are the docs for no-useless-escape. I can put it back and disable the lint rule for that line if you'd prefer.
EDIT: I think the rule is correct /[.]/.test('a')
returns false
, while /[.]/.test('.')
returns true
.
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.
ok, thanks for checking.
Looks good. One comment on a regexp, but maybe I'm missing something? Thanks for doing this! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, cjihrig The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
tslint has been deprecated. This commit replaces it with typescript-eslint.
This is a proposed fix for #2116