Compare commits

...
10 Commits
Author SHA1 Message Date
Leo Taifa Merinen 95a17b285b Update tsconfig.json (#125) 2020-03-27 07:42:17 +01:00
Frieder Bluemle e12d9eccfa Fix file mode and whitespace errors (#123) 2020-03-20 19:35:09 +01:00
Radek Czemerys 57e0381f24 chore: Create CODEOWNERS
https://github.com/react-native-community/.github/issues/40
2020-03-09 17:39:33 +01:00
max 82aff0b000 Fixed prettier nullish chaining bug (#120)
In the `@react-native-community/eslint-config` package a quite outdated version of prettier is used which does not support the nullish chaining yet. While adding prettier to the devDependencies, this bug is fixed.
2020-02-18 10:24:07 +01:00
Jesse Katsumata 5d775c5ac7 chore: update @types/react-native and community eslint-config (#119) 2020-02-17 10:03:36 +01:00
Jesse Katsumata dda75c0514 chore: apply prettier (#115) 2020-01-06 12:18:08 +01:00
Emin Khateeb 9eba4e6e48 completed eslint ts setup and fixed eslint issues (#112)
* completed eslint ts setup and fixed eslint issues

* minor change in direction 😄

* upgraded type definitions

* declared custom global variable

* moved global var definition below imports
2019-12-20 08:36:16 +01:00
Emin Khateeb e31c51d8c5 matched eslint version (#111)
to be the same as in the default template and also updated typescript eslint parser
2019-12-20 07:18:33 +01:00
Rodinei Fagundes e75a4da89d add eslint dependencies (#107) 2019-12-20 05:35:06 +01:00
Joe Redridge b71dc7e3c4 Upgrade typescript to 3.7.3 (#110) 2019-12-13 12:24:14 +01:00
18 changed files with 28 additions and 19 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
node_modules/
.vscode/
.DS_Store
.DS_Store
+1
View File
@@ -0,0 +1 @@
* @emin93 @radko93
+1 -1
View File
@@ -12,4 +12,4 @@ Please add the log output here.
## Steps to reproduce
1.
1.
+1 -1
View File
@@ -26,7 +26,7 @@
## :arrow_forward: Usage
### Note on the legacy CLI
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the above command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the below command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
Further information can be found here: https://github.com/react-native-community/cli#about
+5 -4
View File
@@ -26,8 +26,9 @@ import {
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
declare var global: {HermesInternal: null | {}};
const App = () => {
const usingHermes = typeof HermesInternal === 'object' && HermesInternal !== null;
return (
<>
<StatusBar barStyle="dark-content" />
@@ -36,7 +37,7 @@ const App = () => {
contentInsetAdjustmentBehavior="automatic"
style={styles.scrollView}>
<Header />
{!usingHermes ? null : (
{global.HermesInternal == null ? null : (
<View style={styles.engine}>
<Text style={styles.footer}>Engine: Hermes</Text>
</View>
@@ -45,8 +46,8 @@ const App = () => {
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>Step One</Text>
<Text style={styles.sectionDescription}>
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
Edit <Text style={styles.highlight}>App.tsx</Text> to change
this screen and then come back to see your edits.
</Text>
</View>
<View style={styles.sectionContainer}>
+2
View File
@@ -1,4 +1,6 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
};
Executable → Regular
View File
File mode changed.
+1 -1
View File
@@ -1 +1 @@
{}
{}
Executable → Regular
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
Executable → Regular
View File
File mode changed.
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "HelloWorld",
"displayName": "HelloWorld"
}
}
@@ -35,4 +35,4 @@
"version" : 1,
"author" : "xcode"
}
}
}
@@ -59,7 +59,7 @@
return NO;
}];
}
#ifdef DEBUG
RCTSetLogFunction(RCTDefaultLogFunction);
#endif
+11 -6
View File
@@ -6,7 +6,8 @@
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest"
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"react": "16.9.0",
@@ -15,15 +16,19 @@
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"@types/jest": "^24.0.18",
"@types/react-native": "^0.60.22",
"@types/react-test-renderer": "16.9.0",
"@react-native-community/eslint-config": "^0.0.7",
"@types/jest": "^24.0.24",
"@types/react-native": "^0.61.15",
"@types/react-test-renderer": "16.9.1",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0",
"typescript": "^3.6.3"
"prettier": "^1.19.1",
"typescript": "^3.7.3"
},
"jest": {
"preset": "react-native",
+2 -2
View File
@@ -1,4 +1,4 @@
{
"compilerOptions": {
/* Basic Options */
@@ -15,7 +15,7 @@
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "removeComments": true, /* Do not emit comments to output. */
"noEmit": true, /* Do not emit outputs. */
"incremental": true, /* Enable incremental compilation */
// "incremental": true, /* Enable incremental compilation */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */