-
Notifications
You must be signed in to change notification settings - Fork 17
chore: migrate to oxlint #98
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,3 +45,4 @@ iife | |
| stefanzweifel | ||
| badgen | ||
| vite | ||
| oxlint | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,7 @@ export function merge<T extends ObjectType, U extends ObjectType>( | |
| const v1 = oV1[key]; | ||
| const v2 = oV2[key]; | ||
|
|
||
| return { | ||
| ...state, | ||
| return Object.assign(state, { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When either merged object contains an own enumerable Useful? React with 👍 / 👎. |
||
| [key]: composer({ | ||
| v1, | ||
| v2, | ||
|
|
@@ -81,7 +80,7 @@ export function merge<T extends ObjectType, U extends ObjectType>( | |
| extract, | ||
| path: `${path}.${key}`, | ||
| }), | ||
| }; | ||
| }); | ||
| }, {}); | ||
| } | ||
|
|
||
|
|
||
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.
__proto__as an own property when cloningWhen
inputhas an own enumerable__proto__property, such as an object returned byJSON.parse,Object.assigninvokes the inherited__proto__setter instead of defining that property. Consequently,clone(input)drops the own key and gives the clone an attacker-controlled prototype (for example, a suppliedpollutedproperty becomes inherited), whereas the previous object-spread reducer preserved the data safely.Useful? React with 👍 / 👎.