-
-
Notifications
You must be signed in to change notification settings - Fork 41
chore: upgrade eslint from v8 to v9 #475
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #475 +/- ##
==========================================
+ Coverage 77.16% 77.51% +0.34%
==========================================
Files 4 4
Lines 727 756 +29
Branches 282 307 +25
==========================================
+ Hits 561 586 +25
- Misses 137 141 +4
Partials 29 29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/index.js
Outdated
| const generators = Array.isArray(this.options.generator) | ||
| ? this.options.generator.filter((item) => item.type === "asset") | ||
| ? this.options.generator.filter( | ||
| (item) => !item.type || item.type === "asset", |
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 do you change it?
src/utils.js
Outdated
| if (check([0x57, 0x45, 0x42, 0x50], { offset: 8 })) { | ||
| if ( | ||
| check([0x52, 0x49, 0x46, 0x46]) && | ||
| check([0x57, 0x45, 0x42, 0x50], { offset: 8 }) |
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 do you add more?
src/utils.js
Outdated
| async function squooshImagePoolTeardown() { | ||
| if (pool) { | ||
| await pool.close(); | ||
| await /** @type {{close(): Promise<void>}} */ (pool).close(); |
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.
Describe the pool variable
src/utils.js
Outdated
| const imagePool = | ||
| /** @type {{ingestImage(data: Uint8Array): {preprocess(options: Record<string, unknown>): Promise<void>, encode(options: Record<string, unknown>): Promise<void>, encodedWith: Record<string, {binary: Uint8Array, extension: string}>, decoded: {bitmap: {width: number, height: number}}}, close(): Promise<void>}} */ ( | ||
| pool || squooshImagePoolCreate() | ||
| ); |
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.
Please remove it from everywhere and make a new type, then reuse this type for the pool variable and for return for squooshImagePoolCreate
src/utils.js
Outdated
| if (!encodeOptions[targetCodec]) { | ||
| encodeOptions[targetCodec] = {}; | ||
| if (!(/** @type {Record<string, unknown>} */ (encodeOptions)[targetCodec])) { | ||
| /** @type {Record<string, unknown>} */ (encodeOptions)[targetCodec] = {}; |
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.
It should be not Record<string, unknown>, other options too
src/worker.js
Outdated
| warnings: [], | ||
| errors: [], | ||
| info: { | ||
| ...options.info, |
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 it was changed?
alexander-akait
left a comment
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.
Please in future when you change a code - add comments why it was changed, also please fix the problem above
This PR contains a:
Motivation / Use-Case
upgrade eslint from v8 to v9
Breaking Changes
No
Additional Info
No