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

FIx eslint warnings #1792

Closed

Conversation

priyanshu-kun
Copy link
Contributor

@priyanshu-kun priyanshu-kun commented Sep 15, 2023

Which problem is this PR solving?

Resolves #1608

Description of the changes

  • I fixed eslint warnings in our codebase, which we are got after running yarn lint. This improves code quality, consistency, and reduces technical debt.

Checklist

@priyanshu-kun priyanshu-kun changed the title FIx eslint warnings #1771 FIx eslint warnings Sep 15, 2023
Comment on lines +81 to +86
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/ban-ts-comment': 0,
Copy link
Member

Choose a reason for hiding this comment

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

I think this change defeats the purpose of fixing the eslint warnings. We don't have to turn them off, instead, have to fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Majority of warning are caused by any or empty objects and functions. And I don't know why they use any in codebase I think it's not accidental, it may be solves some purpose and those empty object or function represents default state of something or they used in types.
There are three ways to doing that:

  • One is I can turn off them instance level.
  • Another one is I can ignore them at file level.
  • And last one is I can ignore them at project level.

Copy link
Member

Choose a reason for hiding this comment

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

Some or most of the time, anyacts as an escape from typescript's strict typing. That doesn't mean that it can't be replaced with a more narrower typedef.
Anyway, that is about '@typescript-eslint/no-explicit-any': 0,, what about the other ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

working on!

@anshgoyalevil
Copy link
Member

anshgoyalevil commented Sep 15, 2023

Hey, I think you should have another branch for the changes specific to fixing eslint warnings. Otherwise reviewing the files won't be possible IMO.

@priyanshu-kun
Copy link
Contributor Author

priyanshu-kun commented Sep 15, 2023

Hey, I think you should have another branch for the changes specific to fixing eslint warnings. Otherwise reviewing the files won't be possible IMO.

I don't know what happening but I was created a different branch all together.

@anshgoyalevil
Copy link
Member

Hey, I think you should have another branch for the changes specific to fixing eslint warnings. Otherwise reviewing the files won't be possible IMO.

I don't know what happening but I was created a different all together.

Maybe you selected the branch's origin as your icon-related branch instead of jaeger-ui/main

@priyanshu-kun
Copy link
Contributor Author

priyanshu-kun commented Sep 15, 2023

Hey, I think you should have another branch for the changes specific to fixing eslint warnings. Otherwise reviewing the files won't be possible IMO.

I don't know what happening but I was created a different all together.

Maybe you selected the branch's origin as your icon-related branch instead of jaeger-ui/main

Yeah I was selected the origin git push -u origin branch, is there a way to fix this?

@@ -627,7 +627,7 @@ exports[`<DdgNodeContent> renders correctly when decorationValue is a string 2`]
<span
className="DdgNodeContent--actionsItemIconWrapper"
>
<MdVisibilityOff />
<IoEyeOff />
Copy link
Member

Choose a reason for hiding this comment

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

why are the icon changes in this PR that is meant for fixing lint warnings?

@priyanshu-kun priyanshu-kun deleted the priyanshu-kun/#1608 branch September 16, 2023 06:58
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.

[chore]: Fix eslint warnings
3 participants