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

[chore]: Fix eslint warnings #1608

Open
punithnayak opened this issue Jul 27, 2023 · 4 comments · Fixed by #1800
Open

[chore]: Fix eslint warnings #1608

punithnayak opened this issue Jul 27, 2023 · 4 comments · Fixed by #1800

Comments

@punithnayak
Copy link

What happened?

There some lint warnings shown

Steps to reproduce

  1. Go to the root dir of jaeger-UI
  2. run yarn lint

Expected behavior

There should be no eslint warnings

Relevant log output

`[eslint       ] 
[eslint       ] /jaeger-ui/packages/jaeger-ui/src/components/SearchTracePage/SearchResults/index.test.js
[eslint       ]   178:23  warning  Unexpected unnamed function  func-names
[eslint       ] 
[eslint       ] /jaeger-ui/packages/jaeger-ui/src/components/SearchTracePage/SearchResults/index.tsx
[eslint       ]   117:18  warning  'createBlob' was used before it was defined  @typescript-eslint/no-use-before-define
[eslint       ] 
[eslint       ] /jaeger-ui/packages/jaeger-ui/src/components/TracePage/TraceStatistics/index.tsx
[eslint       ]   284:13  warning  Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element  jsx-a11y/no-static-element-interactions
[eslint       ] 
[eslint       ] /jaeger-ui/packages/jaeger-ui/src/selectors/span.js
[eslint       ]   15:1  warning  Prefer default export on a file with single export  import/prefer-default-export
[eslint       ] 
[eslint       ] ✖ 4 problems (0 errors, 4 warnings)
[eslint       ]

Screenshot

image

Additional context

No response

Jaeger backend version

No response

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

No response

@punithnayak
Copy link
Author

I am also planning to add lint check during ci/cd to prevent further lint warnings/errors in the code

@yurishkuro yurishkuro added cleanup and removed bug labels Jul 29, 2023
@yurishkuro yurishkuro changed the title Fix: eslint warnings [chore]: Fix eslint warnings Jul 29, 2023
@yurishkuro
Copy link
Member

Some of the warnings are due to outdated APIs.

@shuence
Copy link

shuence commented Aug 10, 2023

@yurishkuro Anyone Working on this? if not can you assign this to me?

@yurishkuro
Copy link
Member

you can see linked issues/PRs for parts that are being work on. We do not assign issues.

yurishkuro added a commit that referenced this issue Aug 10, 2023
## Which problem is this PR solving?
- Resolves #1613
- Part of #1608

## Description of the changes
- Update code lines to resolve lint check warnings

## How was this change tested?
- `yarn run esilnt`

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [ ] I have added unit tests for the new functionality

---------

Signed-off-by: Tony Jin <kavinjsir@gmail.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <github@ysh.us>
@priyanshu-kun priyanshu-kun mentioned this issue Sep 15, 2023
4 tasks
yurishkuro added a commit that referenced this issue Sep 15, 2023
## Which problem is this PR solving?
- Too many linter warnings about empty functions, they are not
expecially helpful or critical
- Part of #1608

## Description of the changes
- turn off `no-empty-function` rule
- Fix some other warnings in DeepDependencies

## How was this change tested?
- yarn lint

Signed-off-by: Yuri Shkuro <github@ysh.us>
priyanshu-kun pushed a commit to priyanshu-kun/jaeger-ui that referenced this issue Sep 17, 2023
priyanshu-kun pushed a commit to priyanshu-kun/jaeger-ui that referenced this issue Sep 17, 2023
Signed-off-by: priyanshu-kun <priyanshushrama709@gmail.com>
yurishkuro added a commit that referenced this issue Sep 18, 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
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: priyanshu-kun <priyanshushrama709@gmail.com>
Signed-off-by: Priyanshu Sharma <priyanshushrama709@gmail.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro reopened this Oct 16, 2023
yurishkuro pushed a commit that referenced this issue Oct 25, 2023
## Which problem is this PR solving?
- Resolves part of no-unused-vars warnings for #1608 

## Description of the changes
-  Unused variables have been removed

## How was this change tested?
- By running "yarn lint" command

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`
yurishkuro pushed a commit that referenced this issue Oct 28, 2023
## Which problem is this PR solving?
- Resolves part of no-unused-vars warnings for #1608 

## Description of the changes
-  Fixed ESlint warnings for Function, Boolean and String types

## How was this change tested?
- By running "yarn lint" command

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`
yurishkuro pushed a commit that referenced this issue Dec 24, 2023
## Which problem is this PR solving?
Fixes part of #1608 

## Description of the changes
- Added the minimal types needed to fix the linting warnings
- Replaced `{}` with the `object` type

## How was this change tested?
- Ran `yarn lint` locally 

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [X] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com>
EshaanAgg added a commit to EshaanAgg/jaeger-ui that referenced this issue Dec 24, 2023
## Which problem is this PR solving?
Fixes part of jaegertracing#1608

## Description of the changes
- Added the minimal types needed to fix the linting warnings
- Replaced `{}` with the `object` type

## How was this change tested?
- Ran `yarn lint` locally

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [X] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com>
yurishkuro pushed a commit that referenced this issue Dec 24, 2023
## Which problem is this PR solving?
Fixes part of #1608

## Description of the changes
- Fixed some more ESLint warning by adding relevant type annotations
- `68` warnings to go after this PR

## How was this change tested?
- Ran `yarn lint` locally

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [X] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment