fix eslint warnings
This commit is contained in:
committed by
GitHub
parent
e69adb70b1
commit
81481724ba
+6
-3
@@ -1,5 +1,5 @@
|
|||||||
import { ScrollViewStyleReset } from 'expo-router/html';
|
import { ScrollViewStyleReset } from "expo-router/html";
|
||||||
import { type PropsWithChildren } from 'react';
|
import { type PropsWithChildren } from "react";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is web-only and used to configure the root HTML for every web page during static rendering.
|
* This file is web-only and used to configure the root HTML for every web page during static rendering.
|
||||||
@@ -11,7 +11,10 @@ export default function Root({ children }: PropsWithChildren) {
|
|||||||
<head>
|
<head>
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||||
|
/>
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
||||||
|
|||||||
+11
-11
@@ -6,13 +6,13 @@
|
|||||||
* You can remove the `reset-project` script from package.json and safely delete this file after running it.
|
* You can remove the `reset-project` script from package.json and safely delete this file after running it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require("fs");
|
||||||
const path = require('path');
|
const path = require("path");
|
||||||
|
|
||||||
const root = process.cwd();
|
const root = process.cwd();
|
||||||
const oldDirPath = path.join(root, 'app');
|
const oldDirPath = path.join(root, "app");
|
||||||
const newDirPath = path.join(root, 'app-example');
|
const newDirPath = path.join(root, "app-example");
|
||||||
const newAppDirPath = path.join(root, 'app');
|
const newAppDirPath = path.join(root, "app");
|
||||||
|
|
||||||
const indexContent = `import { Text, View } from "react-native";
|
const indexContent = `import { Text, View } from "react-native";
|
||||||
|
|
||||||
@@ -46,27 +46,27 @@ fs.rename(oldDirPath, newDirPath, (error) => {
|
|||||||
if (error) {
|
if (error) {
|
||||||
return console.error(`Error renaming directory: ${error}`);
|
return console.error(`Error renaming directory: ${error}`);
|
||||||
}
|
}
|
||||||
console.log('/app moved to /app-example.');
|
console.log("/app moved to /app-example.");
|
||||||
|
|
||||||
fs.mkdir(newAppDirPath, { recursive: true }, (error) => {
|
fs.mkdir(newAppDirPath, { recursive: true }, (error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return console.error(`Error creating new app directory: ${error}`);
|
return console.error(`Error creating new app directory: ${error}`);
|
||||||
}
|
}
|
||||||
console.log('New /app directory created.');
|
console.log("New /app directory created.");
|
||||||
|
|
||||||
const indexPath = path.join(newAppDirPath, 'index.tsx');
|
const indexPath = path.join(newAppDirPath, "index.tsx");
|
||||||
fs.writeFile(indexPath, indexContent, (error) => {
|
fs.writeFile(indexPath, indexContent, (error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return console.error(`Error creating index.tsx: ${error}`);
|
return console.error(`Error creating index.tsx: ${error}`);
|
||||||
}
|
}
|
||||||
console.log('app/index.tsx created.');
|
console.log("app/index.tsx created.");
|
||||||
|
|
||||||
const layoutPath = path.join(newAppDirPath, '_layout.tsx');
|
const layoutPath = path.join(newAppDirPath, "_layout.tsx");
|
||||||
fs.writeFile(layoutPath, layoutContent, (error) => {
|
fs.writeFile(layoutPath, layoutContent, (error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return console.error(`Error creating _layout.tsx: ${error}`);
|
return console.error(`Error creating _layout.tsx: ${error}`);
|
||||||
}
|
}
|
||||||
console.log('app/_layout.tsx created.');
|
console.log("app/_layout.tsx created.");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user