Skip to content

Commit

Permalink
disable prefer-reflect for everything but .call and .apply
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdesjardins committed Jul 30, 2017
1 parent 0246985 commit 7f93bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"operator-linebreak": [2, "after"],
"padded-blocks": [2, "never"],
"prefer-destructuring": 0,
"prefer-reflect": [2, { "exceptions": ["delete"] }],
"prefer-reflect": [2, { "exceptions": ["defineProperty", "getOwnPropertyDescriptor", "getPrototypeOf", "setPrototypeOf", "isExtensible", "getOwnPropertyNames", "preventExtensions", "delete"] }],
"quote-props": [2, "as-needed"],
"quotes": [2, "single"],
"require-jsdoc": 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function mapScalarToObject<Field: { key: string }>(option: { fields: Fiel
const object = {};

option.fields.forEach((field, index) => {
Reflect.defineProperty(object, field.key, {
Object.defineProperty(object, field.key, {
get: () => value[index],
set: v => (value[index] = v),
});
Expand Down

0 comments on commit 7f93bde

Please sign in to comment.