Skip to content

Commit

Permalink
exact-by-default in xplat/js
Browse files Browse the repository at this point in the history
Summary:
Turns on the exact-by-default flag in xplat/js and gets rid of the implicit inexact object lint, which has no effect when exact-by-default is on.

Will land this on Monday along with an announcement post.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D18863276

fbshipit-source-id: 07a31e957bea1d1e053e8fa5975fdb1b6da1bdc4
  • Loading branch information
jbrown215 authored and facebook-github-bot committed Dec 9, 2019
1 parent 65a7ec4 commit 6889003
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
Expand Down Expand Up @@ -72,7 +74,6 @@ inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
implicit-inexact-object=error

[strict]
deprecated-type
Expand Down
3 changes: 2 additions & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

module.file_ext=.js
module.file_ext=.json
module.file_ext=.android.js
Expand Down Expand Up @@ -72,7 +74,6 @@ inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
implicit-inexact-object=error

[strict]
deprecated-type
Expand Down
2 changes: 2 additions & 0 deletions jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module.exports = {
}).code;
}

/* $FlowFixMe(>=0.99.0 site=react_native_fb) This fixme can be removed after metro releases
* 0.58 and RN upgrades its dependency */
const {ast} = transformer.transform({
filename: file,
options: {
Expand Down

0 comments on commit 6889003

Please sign in to comment.