diff --git a/.husky/pre-commit b/.husky/pre-commit index 962fa559e0..8f94e1153c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,5 @@ . "$(dirname "$0")/_/husky.sh" npm run sanity + +npx lint-staged \ No newline at end of file diff --git a/package.json b/package.json index 02c3bf8c00..1e930a20a2 100644 --- a/package.json +++ b/package.json @@ -68,10 +68,10 @@ "generateSchema": "npx rnv hooks run -x generateSchema", "link:rnv": "npm r rnv -g && cd packages/rnv && npm link", "lint": "npx eslint ./packages", - "postinstall": "npx lerna link --force-local && npx jetify", + "postinstall": "npx lerna link --force-local && npx jetify && npx husky install ", "pre-publish": "yarn build && yarn link:rnv && yarn lint && yarn test && rnv hooks run -x prePublish && rnv hooks run -x gitCommitAndTag && yarn generateSchema", "prettier-write-all": "npx prettier '**/*.{js,jsx,ts,tsx,mjs,cjs,json,md}' --write --config .prettierrc.js", - "prettier-write-json": "npx prettier '**/{package.json,renative.plugins.json,renative.json,renative.templates.json,renative.template.json,renative.plugin.json,renative.engine.json}' --write --config .prettierrc.js", + "prettier-write-json": "npx prettier '**/{package.json,renative.plugins.json,renative.json,renative.templates.json,renative.template.json,renative.plugin.json,renative.engine.json,rnv.json}' --write --config .prettierrc.js", "report-circular": "npx madge --circular --extensions ts --exclude '\\.(d.ts)$' ./packages", "report-jest": "jest --coverage", "report-ts-coverage": "typescript-coverage-report -p ./packages/core/tsconfig.json -t 99", @@ -128,10 +128,13 @@ "title": "ReNative", "husky": { "hooks": { - "pre-commit": "yarn sanity" + "pre-commit": "yarn sanity && yarn prettier-write-json" } }, "lint-staged": { + "*.json": [ + "prettier --write" + ], "*.js": [ "eslint" ] diff --git a/packages/config-templates/renative.templates.json b/packages/config-templates/renative.templates.json index 52c615ba64..5b8958bb9b 100644 --- a/packages/config-templates/renative.templates.json +++ b/packages/config-templates/renative.templates.json @@ -145,10 +145,7 @@ "androidtv": { "templateAndroid": { "MainActivity_kt": { - "imports": [ - "io.flexn.create.TvRemoteHandlerModule", - "android.view.KeyEvent" - ], + "imports": ["io.flexn.create.TvRemoteHandlerModule", "android.view.KeyEvent"], "methods": [ "override fun dispatchKeyEvent(ev: KeyEvent?): Boolean {", "TvRemoteHandlerModule.getInstance().handleKeyEvent(ev)", @@ -161,10 +158,7 @@ "firetv": { "templateAndroid": { "MainActivity_kt": { - "imports": [ - "io.flexn.create.TvRemoteHandlerModule", - "android.view.KeyEvent" - ], + "imports": ["io.flexn.create.TvRemoteHandlerModule", "android.view.KeyEvent"], "methods": [ "override fun dispatchKeyEvent(ev: KeyEvent?): Boolean {", "TvRemoteHandlerModule.getInstance().handleKeyEvent(ev)", @@ -186,9 +180,7 @@ "webpackConfig": { "modulePaths": true, "moduleAliases": true, - "nextTranspileModules": [ - "@flexn/recyclerlistview" - ] + "nextTranspileModules": ["@flexn/recyclerlistview"] } }, "@flexn/sdk": { @@ -231,9 +223,7 @@ "webpackConfig": { "modulePaths": true, "moduleAliases": true, - "nextTranspileModules": [ - "@flexn/shopify-flash-list" - ] + "nextTranspileModules": ["@flexn/shopify-flash-list"] }, "version": "1.4.9" }, @@ -459,10 +449,7 @@ "@react-native-community/cli": { "disableNpm": true, "version": "^12.3.6", - "supportedPlatforms": [ - "tvos", - "ios" - ] + "supportedPlatforms": ["tvos", "ios"] }, "@react-native-community/cli-platform-android": { "version": "^12.3.6" @@ -471,10 +458,7 @@ "version": "12.3.6", "disablePluginTemplateOverrides": false, "disableNpm": true, - "supportedPlatforms": [ - "tvos", - "ios" - ], + "supportedPlatforms": ["tvos", "ios"], "nodeModuleOverrides": { "^12.3.6": { "fileOverrides": { @@ -582,25 +566,19 @@ } }, "@react-native-community/push-notification-ios": { - "supportedPlatforms": [ - "ios" - ], + "supportedPlatforms": ["ios"], "ios": { "podName": "RNCPushNotificationIOS", "templateXcode": { "AppDelegate_h": { - "appDelegateExtensions": [ - "UNUserNotificationCenterDelegate" - ], + "appDelegateExtensions": ["UNUserNotificationCenterDelegate"], "appDelegateImports": [ "", "" ] }, "AppDelegate_mm": { - "appDelegateImports": [ - "" - ], + "appDelegateImports": [""], "appDelegateMethods": { "application": { "didRegisterForRemoteNotificationsWithDeviceToken": [ @@ -668,9 +646,7 @@ "projectName": "@react-native-firebase_analytics" }, "ios": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -685,9 +661,7 @@ "isStatic": true, "podName": "RNFBAnalytics", "project_pbxproj": { - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] } }, "pluginDependencies": { @@ -714,15 +688,11 @@ ] }, "app_build_gradle": { - "apply": [ - "plugin: 'com.google.gms.google-services'" - ] + "apply": ["plugin: 'com.google.gms.google-services'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'com.google.gms:google-services:4.3.14'" - ] + "dependencies": ["classpath 'com.google.gms:google-services:4.3.14'"] } }, "package": "io.invertase.firebase.app.ReactNativeFirebaseAppPackage", @@ -730,15 +700,11 @@ }, "androidtv": { "app_build_gradle": { - "apply": [ - "plugin: 'com.google.gms.google-services'" - ] + "apply": ["plugin: 'com.google.gms.google-services'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'com.google.gms:google-services:4.2.0'" - ] + "dependencies": ["classpath 'com.google.gms:google-services:4.2.0'"] } }, "package": "io.invertase.firebase.app.ReactNativeFirebaseAppPackage", @@ -746,37 +712,27 @@ }, "firetv": { "app_build_gradle": { - "apply": [ - "plugin: 'com.google.gms.google-services'" - ] + "apply": ["plugin: 'com.google.gms.google-services'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'com.google.gms:google-services:4.2.0'" - ] + "dependencies": ["classpath 'com.google.gms:google-services:4.2.0'"] } }, "package": "io.invertase.firebase.app.ReactNativeFirebaseAppPackage", "projectName": "@react-native-firebase_app" }, "ios": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { - "didFinishLaunchingWithOptions": [ - "FirebaseApp.configure()" - ] + "didFinishLaunchingWithOptions": ["FirebaseApp.configure()"] } }, "isStatic": true, "podName": "RNFBApp", "project_pbxproj": { - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] } }, "version": "20.0.0" @@ -787,9 +743,7 @@ "projectName": "@react-native-firebase_auth" }, "ios": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -804,9 +758,7 @@ "isStatic": true, "podName": "RNFBAuth", "project_pbxproj": { - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] } }, "pluginDependencies": { @@ -818,9 +770,7 @@ "android": { "templateAndroid": { "app_build_gradle": { - "apply": [ - "plugin: 'io.fabric'" - ] + "apply": ["plugin: 'io.fabric'"] }, "BuildGradle": { "buildscript": { @@ -829,9 +779,7 @@ } } }, - "implementations": [ - "'com.google.android.material:material:1.2.1'" - ] + "implementations": ["'com.google.android.material:material:1.2.1'"] }, "package": "io.invertase.firebase.crashlytics.ReactNativeFirebaseCrashlyticsPackage", "projectName": "@react-native-firebase_crashlytics" @@ -842,9 +790,7 @@ "ios": { "templateXcode": { "AppDelegate_h": { - "appDelegateImports": [ - "Firebase" - ] + "appDelegateImports": ["Firebase"] }, "appDelegateMethods": { "application": { @@ -864,9 +810,7 @@ "shellScript": "\"${PODS_ROOT}/Fabric/run\"" } ], - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] } }, "isStatic": true, @@ -905,13 +849,9 @@ "ios": { "templateXcode": { "project_pbxproj": { - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] }, - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -1048,9 +988,7 @@ "android": { "templateAndroid": { "app_build_gradle": { - "apply": [ - "from: \"{{PLUGIN_ROOT}}/sentry.gradle\"" - ] + "apply": ["from: \"{{PLUGIN_ROOT}}/sentry.gradle\""] } }, "implementation": "implementation project(':@sentry_react-native')", @@ -1138,9 +1076,7 @@ }, "deprecated": "crashlytics plugin is deprecated use Crashlytics (uppercase) in combination with Firebase", "ios": { - "appDelegateImports": [ - "Crashlytics" - ], + "appDelegateImports": ["Crashlytics"], "podName": "Crashlytics", "version": "3.13.4" }, @@ -1207,19 +1143,13 @@ "android": { "templateAndroid": { "app_build_gradle": { - "apply": [ - "plugin: 'io.fabric'" - ] + "apply": ["plugin: 'io.fabric'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'io.fabric.tools:gradle:1.25.4'" - ] + "dependencies": ["classpath 'io.fabric.tools:gradle:1.25.4'"] }, - "repositories": [ - "maven { url 'https://maven.fabric.io/public' }" - ] + "repositories": ["maven { url 'https://maven.fabric.io/public' }"] }, "BuildGradle": { "allprojects": { @@ -1237,9 +1167,7 @@ } }, "MainActivity_kt": { - "imports": [ - "io.fabric.sdk.android.Fabric" - ] + "imports": ["io.fabric.sdk.android.Fabric"] } }, "implementation": "implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {\n transitive = true\n }" @@ -1252,14 +1180,10 @@ "extendPlatform": "android" }, "ios": { - "appDelegateImports": [ - "Fabric" - ], + "appDelegateImports": ["Fabric"], "appDelegateMethods": { "application": { - "didFinishLaunchingWithOptions": [ - "Fabric.with([Crashlytics.self])" - ] + "didFinishLaunchingWithOptions": ["Fabric.with([Crashlytics.self])"] } }, "Info_plist": { @@ -1282,19 +1206,13 @@ "android": { "templateAndroid": { "app_build_gradle": { - "apply": [ - "plugin: 'io.fabric'" - ] + "apply": ["plugin: 'io.fabric'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'io.fabric.tools:gradle:1.25.4'" - ] + "dependencies": ["classpath 'io.fabric.tools:gradle:1.25.4'"] }, - "repositories": [ - "maven { url 'https://maven.fabric.io/public' }" - ] + "repositories": ["maven { url 'https://maven.fabric.io/public' }"] }, "BuildGradle": { "allprojects": { @@ -1312,9 +1230,7 @@ } }, "MainActivity_kt": { - "imports": [ - "io.fabric.sdk.android.Fabric" - ] + "imports": ["io.fabric.sdk.android.Fabric"] } }, "implementation": "implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {\n transitive = true\n }" @@ -1339,9 +1255,7 @@ "firebase-core": { "deprecated": "firebase-core plugin is deprecated use Firebase/ instead", "ios": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -1377,20 +1291,14 @@ }, "Firebase/Analytics": { "ios": { - "appDelegateImports": [ - "Firebase" - ], - "podNames": [ - "Firebase/Analytics', '~> 6.3.0" - ] + "appDelegateImports": ["Firebase"], + "podNames": ["Firebase/Analytics', '~> 6.3.0"] }, "disableNpm": true }, "Firebase/Core": { "ios": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -1411,33 +1319,23 @@ ] } }, - "podNames": [ - "Firebase/Core', '~> 6.3.0" - ] + "podNames": ["Firebase/Core', '~> 6.3.0"] }, "disableNpm": true }, "Firebase/Messaging": { "ios": { - "appDelegateImports": [ - "Firebase" - ], - "podNames": [ - "Firebase/Messaging', '~> 6.3.0" - ] + "appDelegateImports": ["Firebase"], + "podNames": ["Firebase/Messaging', '~> 6.3.0"] }, "disableNpm": true }, "google-maps": { "ios": { - "appDelegateImports": [ - "GoogleMaps" - ], + "appDelegateImports": ["GoogleMaps"], "appDelegateMethods": { "application": { - "didFinishLaunchingWithOptions": [ - "GMSServices.provideAPIKey(\"{{props.API_KEY}}\")" - ] + "didFinishLaunchingWithOptions": ["GMSServices.provideAPIKey(\"{{props.API_KEY}}\")"] } }, "podName": "GoogleMaps", @@ -1454,13 +1352,9 @@ "implementation": "implementation('com.google.android.gms:play-services-tagmanager:18.0.1')" }, "ios": { - "podNames": [ - "GoogleTagManager', '~> 7.4.1" - ], + "podNames": ["GoogleTagManager', '~> 7.4.1"], "project_pbxproj": { - "resourceFiles": [ - "RNVApp/container" - ] + "resourceFiles": ["RNVApp/container"] } }, "disableNpm": true @@ -1532,18 +1426,14 @@ }, "next": { "version": "14.2.10", - "supportedPlatforms": [ - "web" - ] + "supportedPlatforms": ["web"] }, "next-seo": "4.28.1", "RCTLinkingIOS": { "ios": { "appDelegateMethods": { "application": { - "open": [ - "RCTLinkingManager.application(app, open: url, options: options)" - ] + "open": ["RCTLinkingManager.application(app, open: url, options: options)"] } } }, @@ -1557,23 +1447,17 @@ "didFailToRegisterForRemoteNotificationsWithError": [ "RCTPushNotificationManager.didFailToRegisterForRemoteNotificationsWithError(error)" ], - "didReceive": [ - "RCTPushNotificationManager.didReceive(notification)" - ], + "didReceive": ["RCTPushNotificationManager.didReceive(notification)"], "didReceiveRemoteNotification": [ "RCTPushNotificationManager.didReceiveRemoteNotification(userInfo, fetchCompletionHandler: completionHandler)" ], - "didRegister": [ - "RCTPushNotificationManager.didRegister(notificationSettings)" - ], + "didRegister": ["RCTPushNotificationManager.didRegister(notificationSettings)"], "didRegisterForRemoteNotificationsWithDeviceToken": [ "RCTPushNotificationManager.didRegisterForRemoteNotifications(withDeviceToken: deviceToken)" ] }, "userNotificationCenter": { - "willPresent": [ - "completionHandler([.alert, .badge, .sound])" - ] + "willPresent": ["completionHandler([.alert, .badge, .sound])"] } } }, @@ -1642,16 +1526,12 @@ "CFBundleURLTypes": [ { "CFBundleURLName": "{{props.URL_NAME}}", - "CFBundleURLSchemes": [ - "{{props.URL_SCHEME}}" - ] + "CFBundleURLSchemes": ["{{props.URL_SCHEME}}"] } ] }, "Podfile": { - "sources": [ - "https://github.com/CocoaPods/Specs.git" - ] + "sources": ["https://github.com/CocoaPods/Specs.git"] } }, "macos": { @@ -1659,9 +1539,7 @@ "CFBundleURLTypes": [ { "CFBundleURLName": "{{props.URL_NAME}}", - "CFBundleURLSchemes": [ - "{{props.URL_SCHEME}}" - ] + "CFBundleURLSchemes": ["{{props.URL_SCHEME}}"] } ] } @@ -1701,9 +1579,7 @@ "react-native-animatable": { "version": "1.3.3", "webpackConfig": { - "nextTranspileModules": [ - "react-native-animatable" - ] + "nextTranspileModules": ["react-native-animatable"] } }, "react-native-audio": { @@ -1767,9 +1643,7 @@ { "CFBundleTypeRole": "None", "CFBundleURLName": "auth0", - "CFBundleURLSchemes": [ - "$(PRODUCT_BUNDLE_IDENTIFIER)" - ] + "CFBundleURLSchemes": ["$(PRODUCT_BUNDLE_IDENTIFIER)"] } ] }, @@ -1851,9 +1725,7 @@ "react-native-camera": { "android": { "app_build_gradle": { - "defaultConfig": [ - "missingDimensionStrategy 'react-native-camera', 'general'" - ] + "defaultConfig": ["missingDimensionStrategy 'react-native-camera', 'general'"] }, "package": "org.reactnative.camera.RNCameraPackage" }, @@ -1862,9 +1734,7 @@ }, "firetv": { "app_build_gradle": { - "defaultConfig": [ - "missingDimensionStrategy 'react-native-camera', 'general'" - ] + "defaultConfig": ["missingDimensionStrategy 'react-native-camera', 'general'"] }, "package": "org.reactnative.camera.RNCameraPackage" }, @@ -1880,32 +1750,21 @@ } }, "react-native-carplay": { - "supportedPlatforms": [ - "ios" - ], + "supportedPlatforms": ["ios"], "ios": { "templateXcode": { "AppDelegate_h": { - "appDelegateImports": [ - "CarPlay/CarPlay.h" - ], - "appDelegateExtensions": [ - "UIApplicationDelegate", - "CPApplicationDelegate" - ] + "appDelegateImports": ["CarPlay/CarPlay.h"], + "appDelegateExtensions": ["UIApplicationDelegate", "CPApplicationDelegate"] }, "AppDelegate_mm": { - "appDelegateImports": [ - "RNCarPlay.h" - ], + "appDelegateImports": ["RNCarPlay.h"], "appDelegateMethods": { "application": { "didConnectCarInterfaceController": [ "[RNCarPlay connectWithInterfaceController:interfaceController window:window]" ], - "didDisconnectCarInterfaceController": [ - "[RNCarPlay disconnect]" - ] + "didDisconnectCarInterfaceController": ["[RNCarPlay disconnect]"] } } } @@ -2150,12 +2009,8 @@ } ] }, - "implementations": [ - "'com.facebook.android:facebook-android-sdk:[4,5)'" - ], - "imports": [ - "com.facebook.CallbackManager" - ], + "implementations": ["'com.facebook.android:facebook-android-sdk:[4,5)'"], + "imports": ["com.facebook.CallbackManager"], "MainActivity_kt": { "createMethods": [], "imports": [], @@ -2187,36 +2042,25 @@ "extendPlatform": "android" }, "ios": { - "appDelegateImports": [ - "FBSDKCoreKit" - ], + "appDelegateImports": ["FBSDKCoreKit"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ "ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)" ], - "open": [ - "ApplicationDelegate.shared.application(app, open: url, options: options)" - ] + "open": ["ApplicationDelegate.shared.application(app, open: url, options: options)"] } }, "Info_plist": { "CFBundleURLTypes": [ { "CFBundleTypeRole": "Editor", - "CFBundleURLSchemes": [ - "fb{{props.APP_ID}}" - ] + "CFBundleURLSchemes": ["fb{{props.APP_ID}}"] } ], "FacebookAppID": "{{props.APP_ID}}", "FacebookDisplayName": "{{props.APP_NAME}}", - "LSApplicationQueriesSchemes": [ - "fbapi", - "fb-messenger-share-api", - "fbauth2", - "fbshareextension" - ] + "LSApplicationQueriesSchemes": ["fbapi", "fb-messenger-share-api", "fbauth2", "fbshareextension"] }, "podName": "react-native-fbsdk" }, @@ -2371,15 +2215,11 @@ ] }, "app_build_gradle": { - "apply": [ - "plugin: 'com.google.gms.google-services'" - ] + "apply": ["plugin: 'com.google.gms.google-services'"] }, "build_gradle": { "buildscript": { - "dependencies": [ - "classpath 'com.google.gms:google-services:4.2.0'" - ] + "dependencies": ["classpath 'com.google.gms:google-services:4.2.0'"] } }, "implementations": [ @@ -2400,9 +2240,7 @@ }, "ios": { "templateXcode": { - "appDelegateImports": [ - "Firebase" - ], + "appDelegateImports": ["Firebase"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -2423,17 +2261,13 @@ ] }, "project_pbxproj": { - "resourceFiles": [ - "RNVApp/GoogleService-Info.plist" - ] + "resourceFiles": ["RNVApp/GoogleService-Info.plist"] }, "Info_plist": { "CFBundleURLTypes": [ { "CFBundleURLName": "{{props.URL_NAME}}", - "CFBundleURLSchemes": [ - "{{props.URL_SCHEME}}" - ] + "CFBundleURLSchemes": ["{{props.URL_SCHEME}}"] } ] } @@ -2574,9 +2408,7 @@ ] }, "app_build_gradle": { - "implementations": [ - "'com.google.android.gms:play-services-cast-framework:21.0.0'" - ] + "implementations": ["'com.google.android.gms:play-services-cast-framework:21.0.0'"] }, "MainActivity_kt": { "createMethods": [ @@ -2586,23 +2418,17 @@ "// cast framework not supported", " }" ], - "imports": [ - "com.google.android.gms.cast.framework.CastContext" - ] + "imports": ["com.google.android.gms.cast.framework.CastContext"] }, "MainApplication_kt": { - "packages": [ - "com.reactnative.googlecast.GoogleCastPackage" - ] + "packages": ["com.reactnative.googlecast.GoogleCastPackage"] } } }, "ios": { "templateXcode": { "AppDelegate_mm": { - "appDelegateImports": [ - "GoogleCast/GoogleCast.h" - ], + "appDelegateImports": ["GoogleCast/GoogleCast.h"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -2617,10 +2443,7 @@ } }, "Info_plist": { - "NSBonjourServices": [ - "_googlecast._tcp", - "_CC1AD845._googlecast._tcp" - ], + "NSBonjourServices": ["_googlecast._tcp", "_CC1AD845._googlecast._tcp"], "NSLocalNetworkUsageDescription": "${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network." } }, @@ -2637,9 +2460,7 @@ }, "react-native-home-indicator": { "ios": { - "appDelegateImports": [ - "react_native_home_indicator" - ], + "appDelegateImports": ["react_native_home_indicator"], "appDelegateMethods": { "application": { "didFinishLaunchingWithOptions": [ @@ -2658,9 +2479,7 @@ "android": { "templateAndroid": { "app_build_gradle": { - "defaultConfig": [ - "missingDimensionStrategy 'store', 'play'" - ] + "defaultConfig": ["missingDimensionStrategy 'store', 'play'"] } }, "package": "com.dooboolab.RNIap.RNIapPackage" @@ -2701,9 +2520,7 @@ "ios": { "templateXcode": { "Podfile": { - "sources": [ - "https://github.com/TimOliver/TOCropViewController.git" - ] + "sources": ["https://github.com/TimOliver/TOCropViewController.git"] } }, "podName": "RNImageCropPicker" @@ -2711,9 +2528,7 @@ "macos": { "templateXcode": { "Podfile": { - "sources": [ - "https://github.com/TimOliver/TOCropViewController.git" - ] + "sources": ["https://github.com/TimOliver/TOCropViewController.git"] } }, "podName": "RNImageCropPicker" @@ -2846,10 +2661,7 @@ "moduleAliases": { "react-native-linear-gradient": "react-native-web-linear-gradient" }, - "modulePaths": [ - "react-native-web-linear-gradient", - "react-native-linear-gradient" - ] + "modulePaths": ["react-native-web-linear-gradient", "react-native-linear-gradient"] } }, "react-native-local-mongodb": { @@ -2989,9 +2801,7 @@ "android": { "templateAndroid": { "MainActivity_kt": { - "imports": [ - "android.content.res.Configuration" - ], + "imports": ["android.content.res.Configuration"], "methods": [ "override fun onConfigurationChanged(newConfig:Configuration) {", " super.onConfigurationChanged(newConfig)", @@ -3006,14 +2816,10 @@ }, "ios": { "templateXcode": { - "appDelegateImports": [ - "react_native_orientation_locker" - ], + "appDelegateImports": ["react_native_orientation_locker"], "appDelegateMethods": { "application": { - "supportedInterfaceOrientationsFor": [ - "Orientation.getOrientation();" - ] + "supportedInterfaceOrientationsFor": ["Orientation.getOrientation();"] } } }, @@ -3239,10 +3045,7 @@ "react-native-root-toast": { "version": "3.6.0", "webpackConfig": { - "nextTranspileModules": [ - "react-native-root-siblings", - "static-container" - ] + "nextTranspileModules": ["react-native-root-siblings", "static-container"] } }, "react-native-safe-area-context": { @@ -3399,22 +3202,12 @@ "version": "0.11.2" }, "react-native-splash-screen": { - "supportedPlatforms": [ - "android", - "androidtv", - "firetv", - "ios", - "androidwear" - ], + "supportedPlatforms": ["android", "androidtv", "firetv", "ios", "androidwear"], "android": { "templateAndroid": { "MainActivity_kt": { - "createMethods": [ - "SplashScreen.show(this)" - ], - "imports": [ - "org.devio.rn.splashscreen.SplashScreen" - ] + "createMethods": ["SplashScreen.show(this)"], + "imports": ["org.devio.rn.splashscreen.SplashScreen"] } }, "package": "org.devio.rn.splashscreen.SplashScreenReactPackage" @@ -3422,12 +3215,8 @@ "androidwear": { "templateAndroid": { "MainActivity_kt": { - "createMethods": [ - "SplashScreen.show(this)" - ], - "imports": [ - "org.devio.rn.splashscreen.SplashScreen" - ] + "createMethods": ["SplashScreen.show(this)"], + "imports": ["org.devio.rn.splashscreen.SplashScreen"] } }, "package": "org.devio.rn.splashscreen.SplashScreenReactPackage" @@ -3435,12 +3224,8 @@ "androidtv": { "templateAndroid": { "MainActivity_kt": { - "createMethods": [ - "SplashScreen.show(this)" - ], - "imports": [ - "org.devio.rn.splashscreen.SplashScreen" - ] + "createMethods": ["SplashScreen.show(this)"], + "imports": ["org.devio.rn.splashscreen.SplashScreen"] } }, "package": "org.devio.rn.splashscreen.SplashScreenReactPackage" @@ -3448,12 +3233,8 @@ "firetv": { "templateAndroid": { "MainActivity_kt": { - "createMethods": [ - "SplashScreen.show(this)" - ], - "imports": [ - "org.devio.rn.splashscreen.SplashScreen" - ] + "createMethods": ["SplashScreen.show(this)"], + "imports": ["org.devio.rn.splashscreen.SplashScreen"] } }, "package": "org.devio.rn.splashscreen.SplashScreenReactPackage" @@ -3461,14 +3242,10 @@ "ios": { "templateXcode": { "AppDelegate_mm": { - "appDelegateImports": [ - "RNSplashScreen.h" - ], + "appDelegateImports": ["RNSplashScreen.h"], "appDelegateMethods": { "application": { - "didFinishLaunchingWithOptions": [ - "[RNSplashScreen show]" - ] + "didFinishLaunchingWithOptions": ["[RNSplashScreen show]"] } } } @@ -3571,11 +3348,7 @@ }, "react-native-tvos": { "version": "0.73.6-0", - "supportedPlatforms": [ - "tvos", - "firetv", - "androidtv" - ] + "supportedPlatforms": ["tvos", "firetv", "androidtv"] }, "react-native-tvos-controller": { "ios": { @@ -3857,9 +3630,7 @@ "webpackConfig": { "moduleAliases": true, "modulePaths": true, - "nextTranspileModules": [ - "recyclerlistview" - ] + "nextTranspileModules": ["recyclerlistview"] } }, "renative": { @@ -3893,9 +3664,7 @@ "rnv-platform-info": { "version": "1.0.16", "webpackConfig": { - "nextTranspileModules": [ - "rnv-platform-info" - ] + "nextTranspileModules": ["rnv-platform-info"] } }, "Sentry": { @@ -3927,9 +3696,7 @@ "afterEvaluate": [ "com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true" ], - "implementations": [ - "'com.google.android.gms:play-services-wallet:16.0.0'" - ], + "implementations": ["'com.google.android.gms:play-services-wallet:16.0.0'"], "package": "com.gettipsi.stripe.StripeReactPackage" }, "ios": { diff --git a/packages/template-starter/renative.json b/packages/template-starter/renative.json index f31d5430ca..51d7f73ab3 100644 --- a/packages/template-starter/renative.json +++ b/packages/template-starter/renative.json @@ -84,9 +84,7 @@ "minSdkVersion": 21, "extendPlatform": "android", "engine": "engine-rn-tvos", - "includedPermissions": [ - "INTERNET" - ] + "includedPermissions": ["INTERNET"] }, "web": { "engine": "engine-rn-next" @@ -101,9 +99,7 @@ "engine": "engine-rn-electron", "assetFolderPlatform": "electron", "webpackConfig": { - "excludedPaths": [ - "pages" - ] + "excludedPaths": ["pages"] } }, "windows": { diff --git a/packages/template-starter/renative.template.json b/packages/template-starter/renative.template.json index 91c2e5fc06..59332f2ddf 100644 --- a/packages/template-starter/renative.template.json +++ b/packages/template-starter/renative.template.json @@ -21,35 +21,15 @@ ] }, { - "paths": [ - "Gemfile", - "metro.config.js", - ".bundle", - "react-native.config.js" - ], - "platforms": [ - "ios", - "android", - "androidwear", - "tvos", - "firetv", - "androidtv" - ] + "paths": ["Gemfile", "metro.config.js", ".bundle", "react-native.config.js"], + "platforms": ["ios", "android", "androidwear", "tvos", "firetv", "androidtv"] }, { - "paths": [ - "next.config.js", - "next-env.d.ts", - "src/pages" - ], - "platforms": [ - "web" - ] + "paths": ["next.config.js", "next-env.d.ts", "src/pages"], + "platforms": ["web"] }, { - "paths": [ - "webpack.config.js" - ], + "paths": ["webpack.config.js"], "platforms": [ "windows", "macos", @@ -84,10 +64,7 @@ "minipass": "7.1.2", "readable-stream": "4.5.2" }, - "browserslist": [ - ">0.2%", - "not op_mini all" - ], + "browserslist": [">0.2%", "not op_mini all"], "scripts": { "postinstall": "node scripts/postinstall.js" } @@ -98,10 +75,6 @@ "pkg-dir": "7.0.0", "xmlbuilder": "^15.1.1" }, - "defaultSelectedPlatforms": [ - "web", - "ios", - "android" - ] + "defaultSelectedPlatforms": ["web", "ios", "android"] } }