exact-by-default in xplat/js

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
This commit is contained in:
Jordan Brown 2019-12-09 11:00:46 -08:00 committed by Facebook Github Bot
parent 65a7ec4473
commit 688900342b
3 changed files with 6 additions and 2 deletions

View File

@ -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
@ -72,7 +74,6 @@ inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
implicit-inexact-object=error
[strict]
deprecated-type

View File

@ -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
@ -72,7 +74,6 @@ inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
implicit-inexact-object=error
[strict]
deprecated-type

View File

@ -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: {