Skip to content

Commit de15157

Browse files
Add prettier config, format script and reformat files
1 parent f368287 commit de15157

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

RNTester/js/SwipeableFlatListExample.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ const SwipeableFlatListExample = createReactClass({
7474
<View style={styles.row}>
7575
<Image style={styles.rowIcon} source={item.icon} />
7676
<View style={styles.rowData}>
77-
<Text style={styles.rowDataText}>
78-
{item.data}
79-
</Text>
77+
<Text style={styles.rowDataText}>{item.data}</Text>
8078
</View>
8179
</View>
8280
);

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
"engines": {
1111
"node": ">=4"
1212
},
13+
"prettier": {
14+
"requirePragma": true,
15+
"singleQuote": true,
16+
"trailingComma": "all",
17+
"bracketSpacing": false,
18+
"jsxBracketSameLine": true,
19+
"parser": "flow"
20+
},
1321
"jest": {
1422
"transform": {
1523
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|png|psd|svg|webp)$": "<rootDir>/jest/assetFileTransformer.js",
@@ -118,6 +126,7 @@
118126
"test": "jest",
119127
"flow": "flow",
120128
"lint": "eslint .",
129+
"prettier": "find . -name node_modules -prune -or -name '*.js' -print | xargs prettier --write",
121130
"start": "/usr/bin/env bash -c './scripts/packager.sh \"$@\" || true' --",
122131
"test-android-setup": "docker pull containership/android-base:latest",
123132
"test-android-build": "docker build -t react/android -f ContainerShip/Dockerfile.android .",
@@ -201,7 +210,7 @@
201210
"flow-bin": "^0.54.0",
202211
"jest": "^21",
203212
"mock-fs": "^4.4.1",
204-
"prettier": "1.7.0",
213+
"prettier": "1.7.3",
205214
"react": "16.0.0-rc.3",
206215
"react-test-renderer": "16.0.0-rc.3",
207216
"shelljs": "^0.7.8",

0 commit comments

Comments
 (0)