Skip to content

Commit 4f4a5b5

Browse files
authored
style: Use prettier to format more files. (#381)
1 parent 35e6ea9 commit 4f4a5b5

File tree

14 files changed

+52
-90
lines changed

14 files changed

+52
-90
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
- run:
1414
name: Install
1515
command: yarn install
16+
- run:
17+
name: Lint
18+
command: yarn lint
1619
- run:
1720
name: Build
1821
command: yarn build

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ios/Vendor

jest.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
22
preset: 'react-native',
3-
"transform": {
4-
"^.+\\.(js)$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
3+
transform: {
4+
'^.+\\.(js)$':
5+
'<rootDir>/node_modules/react-native/jest/preprocessor.js',
56
},
67
modulePathIgnorePatterns: [
78
'react-native-fast-image-example*',

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"scripts": {
2525
"build": "exit 0",
2626
"commit": "git-cz",
27-
"format": "prettier --write --list-different ./src/*.js",
27+
"prettier": "prettier './**/*.{js,d.ts,js.flow,yml}'",
28+
"format": "yarn prettier --write",
29+
"lint": "yarn prettier --list-different",
2830
"prepare": "git submodule update --init --recursive",
2931
"semantic-release": "semantic-release",
3032
"test": "yarn run format && yarn run test:jest",
@@ -42,7 +44,7 @@
4244
"cz-conventional-changelog": "^2.1.0",
4345
"jest": "^23.6.0",
4446
"metro-react-native-babel-preset": "0.48.1",
45-
"prettier": "^1.15.2",
47+
"prettier": "^1.15.3",
4648
"prettier-check": "^2.0.0",
4749
"prop-types": "^15.6.2",
4850
"react": "16.6.0-alpha.8af6728",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @format */
22

3-
import {AppRegistry} from 'react-native';
4-
import App from './src';
5-
import {name as appName} from './app.json';
3+
import { AppRegistry } from 'react-native'
4+
import App from './src'
5+
import { name as appName } from './app.json'
66

7-
AppRegistry.registerComponent(appName, () => App);
7+
AppRegistry.registerComponent(appName, () => App)

react-native-fast-image-example-cocoapods/src/DefaultImageGrid.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ const DefaultImageGrid = () => <ImageGrid ImageComponent={Image} />
88

99
DefaultImageGrid.navigationOptions = {
1010
tabBarLabel: 'Image Grid',
11-
tabBarIcon: props => (
12-
<Icon name="ios-image" {...props} />
13-
),
11+
tabBarIcon: props => <Icon name="ios-image" {...props} />,
1412
}
1513

1614
export default DefaultImageGrid

react-native-fast-image-example-cocoapods/src/FastImageExamples.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ const FastImageExample = () => (
4545

4646
FastImageExample.navigationOptions = {
4747
tabBarLabel: 'FastImage Example',
48-
tabBarIcon: props => (
49-
<Icon
50-
name="ios-information-circle"
51-
{...props}
52-
/>
53-
),
48+
tabBarIcon: props => <Icon name="ios-information-circle" {...props} />,
5449
}
5550

5651
const styles = StyleSheet.create({

react-native-fast-image-example-cocoapods/src/FastImageGrid.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ const FastImageGrid = () => <ImageGrid ImageComponent={FastImage} />
77

88
FastImageGrid.navigationOptions = {
99
tabBarLabel: 'FastImage Grid',
10-
tabBarIcon: props => (
11-
<Icon name="ios-photos" {...props} />
12-
),
10+
tabBarIcon: props => <Icon name="ios-photos" {...props} />,
1311
}
1412

1513
export default FastImageGrid
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @format */
22

3-
import {AppRegistry} from 'react-native';
4-
import App from './src';
5-
import {name as appName} from './app.json';
3+
import { AppRegistry } from 'react-native'
4+
import App from './src'
5+
import { name as appName } from './app.json'
66

7-
AppRegistry.registerComponent(appName, () => App);
7+
AppRegistry.registerComponent(appName, () => App)

react-native-fast-image-example/src/DefaultImageGrid.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ const DefaultImageGrid = () => <ImageGrid ImageComponent={Image} />
88

99
DefaultImageGrid.navigationOptions = {
1010
tabBarLabel: 'Image Grid',
11-
tabBarIcon: props => (
12-
<Icon name="ios-image" {...props} />
13-
),
11+
tabBarIcon: props => <Icon name="ios-image" {...props} />,
1412
}
1513

1614
export default DefaultImageGrid

0 commit comments

Comments
 (0)