From 1b3c31ff6acc27183547b4cf0e37214895f5f219 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 7 Oct 2019 14:26:16 -0700 Subject: [PATCH] Run prettier across codebase Close #1444 --- packages/benchmarks/src/cases/SierpinskiTriangle.js | 2 +- packages/benchmarks/src/cases/Tree.js | 2 +- .../src/implementations/inline-styles/View.js | 10 +++++++++- .../ActivityIndicator/examples/PropSize.js | 4 +++- .../storybook/1-components/Switch/SwitchScreen.js | 6 +++--- .../1-components/Text/examples/PropChildren.js | 3 +-- .../1-components/Touchable/examples/DelayEvents.js | 4 +++- .../1-components/Touchable/examples/FeedbackEvents.js | 4 +++- .../storybook/2-apis/AppState/AppStateScreen.js | 2 +- packages/website/storybook/ui-explorer/UIExplorer.js | 7 ++++++- 10 files changed, 31 insertions(+), 13 deletions(-) diff --git a/packages/benchmarks/src/cases/SierpinskiTriangle.js b/packages/benchmarks/src/cases/SierpinskiTriangle.js index 6a1a3d1c..b8e5c152 100644 --- a/packages/benchmarks/src/cases/SierpinskiTriangle.js +++ b/packages/benchmarks/src/cases/SierpinskiTriangle.js @@ -45,7 +45,7 @@ class SierpinskiTriangle extends React.Component { } // introduce randomness to ensure that repeated runs don't produce the same colors - const color = fn(renderCount * Math.random() / 20); + const color = fn((renderCount * Math.random()) / 20); return ( ); diff --git a/packages/benchmarks/src/cases/Tree.js b/packages/benchmarks/src/cases/Tree.js index 98df50c5..9ba05640 100644 --- a/packages/benchmarks/src/cases/Tree.js +++ b/packages/benchmarks/src/cases/Tree.js @@ -21,7 +21,7 @@ class Tree extends Component { let result = ( - {depth === 0 && } + {depth === 0 && } {depth !== 0 && Array.from({ length: breadth }).map((el, i) => ( { class View extends React.Component { render() { const { style, ...other } = this.props; - return
; + return ( +
+ ); } } diff --git a/packages/website/storybook/1-components/ActivityIndicator/examples/PropSize.js b/packages/website/storybook/1-components/ActivityIndicator/examples/PropSize.js index 9ef7898e..6faab077 100644 --- a/packages/website/storybook/1-components/ActivityIndicator/examples/PropSize.js +++ b/packages/website/storybook/1-components/ActivityIndicator/examples/PropSize.js @@ -9,7 +9,9 @@ const sizes = [20, 'small', 36, 'large', 60]; const ActivityIndicatorSizeExample = () => ( - {sizes.map((size, i) => )} + {sizes.map((size, i) => ( + + ))} ); diff --git a/packages/website/storybook/1-components/Switch/SwitchScreen.js b/packages/website/storybook/1-components/Switch/SwitchScreen.js index 588026ab..1fe3d3a9 100644 --- a/packages/website/storybook/1-components/Switch/SwitchScreen.js +++ b/packages/website/storybook/1-components/Switch/SwitchScreen.js @@ -105,21 +105,21 @@ const SwitchScreen = () => ( /> ( (Normal text, (and bold - (and tiny inherited bold blue) - ) + (and tiny inherited bold blue)) ) diff --git a/packages/website/storybook/1-components/Touchable/examples/DelayEvents.js b/packages/website/storybook/1-components/Touchable/examples/DelayEvents.js index c2ffc735..fd3615c4 100644 --- a/packages/website/storybook/1-components/Touchable/examples/DelayEvents.js +++ b/packages/website/storybook/1-components/Touchable/examples/DelayEvents.js @@ -51,7 +51,9 @@ export default class TouchableDelayEvents extends PureComponent { - {this.state.eventLog.map((e, ii) => {e})} + {this.state.eventLog.map((e, ii) => ( + {e} + ))} ); diff --git a/packages/website/storybook/1-components/Touchable/examples/FeedbackEvents.js b/packages/website/storybook/1-components/Touchable/examples/FeedbackEvents.js index 0504de66..a0e067d4 100644 --- a/packages/website/storybook/1-components/Touchable/examples/FeedbackEvents.js +++ b/packages/website/storybook/1-components/Touchable/examples/FeedbackEvents.js @@ -47,7 +47,9 @@ export default class TouchableFeedbackEvents extends PureComponent { - {this.state.eventLog.map((e, ii) => {e})} + {this.state.eventLog.map((e, ii) => ( + {e} + ))} ); diff --git a/packages/website/storybook/2-apis/AppState/AppStateScreen.js b/packages/website/storybook/2-apis/AppState/AppStateScreen.js index dd1eab97..3fa5c2d2 100644 --- a/packages/website/storybook/2-apis/AppState/AppStateScreen.js +++ b/packages/website/storybook/2-apis/AppState/AppStateScreen.js @@ -34,7 +34,7 @@ const AppStateScreen = () => ( diff --git a/packages/website/storybook/ui-explorer/UIExplorer.js b/packages/website/storybook/ui-explorer/UIExplorer.js index 8e61d8e0..cf660844 100644 --- a/packages/website/storybook/ui-explorer/UIExplorer.js +++ b/packages/website/storybook/ui-explorer/UIExplorer.js @@ -18,7 +18,12 @@ const Title = ({ children }) => ( export const Description = ({ children }) => ( - {insertBetween(() => , React.Children.toArray(children))} + {insertBetween( + () => ( + + ), + React.Children.toArray(children) + )} );