X Tutup
The Wayback Machine - https://web.archive.org/web/20200529215151/https://github.com/airbnb/javascript/pull/1917/files
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

Allow modification of draft and draftState for "immer" #1917

Open
wants to merge 1 commit into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -179,13 +179,15 @@ module.exports = {
ignorePropertyModificationsFor: [
'acc', // for reduce accumulators
'accumulator', // for reduce accumulators
'e', // for e.returnvalue
'e', // for e.returnValue
'ctx', // for Koa routing
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
'response', // for Express responses
'$scope', // for Angular 1 scopes
'draft', // for immer
'draftState', // for immer

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 16, 2018

Collaborator

i don't think we need to add specific exceptions for every mutating pattern, and i'm not yet convinced that immer's pattern of encouraging mutation in code is a beneficial one.

]
}],

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.
X Tutup