Skip to content

Clean up lint and prettier errors #991

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

clintonmedbery
Copy link
Contributor

Fixes Issue #969

I closed my other PR around unused imports and updated the issue to tackle the bigger problem of the git hooks not working anymore and the files were not getting linted.

So in short I:

  1. Updated husky to 8.0.0 and updated the hooks
  2. Updated prettier and moved our preferences into a .prettierrc file.
  3. Fixed all linting and prettier errors.

Hopefully this can keep this branch clean going further. I was tempted to make this a pre-commit hook, but I didn't want to get to presumptuous 😄

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 15, 2023
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 15, 2023
Copy link
Contributor

@davidgamero davidgamero left a comment

Choose a reason for hiding this comment

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

thank you this is a very helpful contribution and is much appreciated!

src/config.ts Outdated
@@ -405,19 +401,19 @@ export class KubeConfig implements SecurityAuthentication{
);
}

public makeApiClient<T extends ApiType>(apiClientType: ApiConstructor<T>): T {
Copy link
Contributor

Choose a reason for hiding this comment

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

i see why the linter removed this, but we may need to reimplement this interface later on to get the object and cache features working again, maybe drop a todo in here for the future?
the newer OpenAPIGen typescript outputs don't expose much to form an interface out of, but it'd be nice to clean up the contract

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively I can tell the linter to ignore it. If I don't hear back I will just drop a TODO.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure if it can ignore the declaration of ApiType that would work, idk if you'd have to ignore every consuming line too

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a lint ignore here, but also a TODO to fix this up so it obeys lint later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Added an ignore comment and a TODO comment.

@davidgamero
Copy link
Contributor

@brendanburns lgtm

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 16, 2023
@clintonmedbery clintonmedbery force-pushed the clean-up-lint-and-prettier-errors branch from 049d6bb to e24ff99 Compare February 16, 2023 18:34
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 16, 2023
@clintonmedbery
Copy link
Contributor Author

clintonmedbery commented Feb 16, 2023

Should we merge this with those checks failing? Or I might branch off of here and fix those errors and PR into this one. @brendandburns

@clintonmedbery
Copy link
Contributor Author

So given that tests were failing, I went ahead and fixed the critical security risks and in the process updated mocha and included the mocha file from master. I also saw that codeql was failing because of a test file so I excluded them. Hopefully we are good to go now! 😂

cc @brendandburns @davidgamero

@clintonmedbery clintonmedbery force-pushed the clean-up-lint-and-prettier-errors branch 5 times, most recently from 324b272 to d781a01 Compare March 2, 2023 21:33
@clintonmedbery clintonmedbery force-pushed the clean-up-lint-and-prettier-errors branch from d781a01 to 99ddffd Compare March 2, 2023 21:57
@brendandburns
Copy link
Contributor

Nice, thank you!

/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 Mar 3, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, clintonmedbery

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 5a08ea9 into kubernetes-client:release-1.x Mar 3, 2023
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.

4 participants