Skip to content

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

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Jan 14, 2025

tslint has been deprecated. This commit replaces it with typescript-eslint.

This is a proposed fix for #2116

tslint has been deprecated. This commit replaces it with
typescript-eslint.
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 14, 2025
@@ -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))) {
Copy link
Contributor

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?

Copy link
Contributor Author

@cjihrig cjihrig Jan 16, 2025

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, thanks for checking.

@brendandburns
Copy link
Contributor

Looks good. One comment on a regexp, but maybe I'm missing something?

Thanks for doing this!

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 16, 2025
@k8s-ci-robot
Copy link
Contributor

[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:
  • OWNERS [brendandburns,cjihrig]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 66d1b3f into kubernetes-client:main Jan 16, 2025
8 checks passed
@cjihrig cjihrig deleted the linter branch January 16, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants