-
Notifications
You must be signed in to change notification settings - Fork 529
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 lint issues when bumping eslint-plugin-import #1652
Fix lint issues when bumping eslint-plugin-import #1652
Conversation
@@ -1,4 +1,4 @@ | |||
// Copyright (c) 2017 Uber Technologies, Inc. | |||
// Copyright (c) 2023 Uber Technologies, Inc. |
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.
why is this changed?
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 am wondering if we need to keep the year up to date if we have the code lines in the file get updated?
Or do we keep them as origin?
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.
Uber's was the original copyright, new contributions should use "The Jaeger Authors", which you can add as a line above with the current year if you want.
We tend to keep the original year a specific (c) by-line was introduced. I checked with legal once, there wasn't a lot of value in updating the year.
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.
Sounds good! I'm going to roll back the corresponding change as it is not necessary. Thx for letting me know:)
packages/jaeger-ui/src/components/SearchTracePage/SearchResults/index.tsx
Show resolved
Hide resolved
I think I might miss the point of ci error before. Just realized that It seems we can reproduce the issue locally by removing the --cache flag when running eslint. Let me try resolving them. |
7eb3e68
to
2358668
Compare
@@ -14,7 +14,7 @@ | |||
|
|||
import Chance from 'chance'; | |||
|
|||
import { getSpanId } from '../selectors/span'; | |||
import getSpanId from '../selectors/span'; |
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.
this is an exceedingly silly selector, is it actually used, or can we delete it?
@@ -13,7 +13,7 @@ | |||
// limitations under the License. | |||
|
|||
import { followsFromRef } from './trace.fixture'; | |||
import { getSpanId } from './span'; | |||
import getSpanId from './span'; |
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.
if this is the only place, let's just replace it with span.ID and delete the selector
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.
Sounds good!
your description links to issues, but does not put the word Fixes or Resolves in front of them. Please update, this way when the PR is merged the issues will be closed (unless it does not resolve them completely, in which case we typically use the format |
package.json
Outdated
@@ -14,7 +14,7 @@ | |||
"eslint": "8.46.0", | |||
"eslint-config-airbnb": "19.0.4", | |||
"eslint-config-prettier": "9.0.0", | |||
"eslint-plugin-import": "2.27.5", | |||
"eslint-plugin-import": "2.28.0", |
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.
once the CI is green, I would prefer to remove the version upgrade and only leave the code changes, then let the dependabot to redo its PR for the actual upgrade.
- Update code lines based on lint check, avoid error and warning. - Remove `getSpanId` which is unnecessary. Signed-off-by: Tony Jin <kavinjsir@gmail.com>
2358668
to
642c8e0
Compare
Signed-off-by: Yuri Shkuro <github@ysh.us>
@Kavinjsir I removed the upgrade to keep the scope to code changes only, and it fails the CI, can you please check why? |
@yurishkuro thx for helping with the updates for dep version and pr description! Let me take a look for the CI. Seems like some deprecated usage from old react, not sure why occurs though.. |
Make mock `Blob` a class Signed-off-by: Tony Jin <kavinjsir@gmail.com>
constructor(text, options) { | ||
this.text = text; | ||
this.options = options; | ||
} |
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.
@yurishkuro From my local, it seems like what really brought the unit-test
failure is:
(Not sure why it was missed in the CI logs)
For this error above, I think I made a mistake to convert Blob
to an arrow function that is not able to call by new
.
So I change such global.Blob
to an "explicit" class. Assuming this can:
- Still resolve the origin lint warning
- Attempt to make it clear so satisfy calling by keyword
new
.
How do you think of this?
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1652 +/- ##
==========================================
- Coverage 96.01% 96.01% -0.01%
==========================================
Files 242 241 -1
Lines 7559 7558 -1
Branches 1984 1984
==========================================
- Hits 7258 7257 -1
Misses 301 301
☔ View full report in Codecov by Sentry. |
Thanks, @Kavinjsir, the dependabot PR #1609 was successfully merged after these changes. 🎉 |
Which problem is this PR solving?
Description of the changes
How was this change tested?
yarn run esilnt
Checklist