Back out "Upgrade Prettier from 1.17 to 2.0.2."

Differential Revision: D20639755

fbshipit-source-id: 5028563f9cf0527a30b4259daac50cdc03934bfd
This commit is contained in:
Michael Bolin
2020-03-24 21:47:35 -07:00
committed by Facebook GitHub Bot
parent cf44650b3f
commit 0b9ea60b4f
383 changed files with 2072 additions and 2051 deletions
@@ -90,7 +90,7 @@ module.exports = {
moduleSpecName: string,
): FilesOutput {
const nativeModules = Object.keys(schema.modules)
.map((moduleName) => {
.map(moduleName => {
const modules = schema.modules[moduleName].nativeModules;
if (modules == null) {
return null;
@@ -102,15 +102,17 @@ module.exports = {
.reduce((acc, components) => Object.assign(acc, components), {});
const modules = Object.keys(nativeModules)
.map((name) => {
.map(name => {
const {properties} = nativeModules[name];
const traversedProperties = properties
.map((prop) => {
.map(prop => {
const traversedArgs = prop.typeAnnotation.params
.map((param) => {
.map(param => {
const translatedParam = translatePrimitiveJSTypeToCpp(
param.typeAnnotation,
`Unspopported type for param "${param.name}" in ${prop.name}. Found: ${param.typeAnnotation.type}`,
`Unspopported type for param "${param.name}" in ${
prop.name
}. Found: ${param.typeAnnotation.type}`,
);
const isObject = translatedParam.startsWith('jsi::');
return (
@@ -126,7 +128,9 @@ module.exports = {
'::_RETURN_VALUE_::',
translatePrimitiveJSTypeToCpp(
prop.typeAnnotation.returnTypeAnnotation,
`Unspopported return type for ${prop.name}. Found: ${prop.typeAnnotation.returnTypeAnnotation.type}`,
`Unspopported return type for ${prop.name}. Found: ${
prop.typeAnnotation.returnTypeAnnotation.type
}`,
),
)
.replace(