Skip to content

Commit baa93f6

Browse files
committed
re-add prettierrc
1 parent db0c67a commit baa93f6

File tree

2 files changed

+30
-25
lines changed

2 files changed

+30
-25
lines changed

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"bracketSpacing": false
6+
}

demo/src/screens/componentScreens/DrawerScreen.js

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import _ from 'lodash';
21
import React, {Component} from 'react';
32
import {StyleSheet, ScrollView, LayoutAnimation} from 'react-native';
43
import {
@@ -9,33 +8,33 @@ import {
98
Drawer,
109
Text,
1110
Button,
12-
Avatar,
11+
Avatar
1312
} from 'react-native-ui-lib'; //eslint-disable-line
1413
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
1514
import conversations from '../../data/conversations';
1615

1716
import {
1817
renderBooleanOption,
1918
renderSliderOption,
20-
renderColorOption,
19+
renderColorOption
2120
} from '../ExampleScreenPresenter';
2221

2322
const ITEMS = {
2423
read: {
2524
icon: require('../../assets/icons/mail.png'),
2625
text: 'Read',
27-
background: Colors.green30,
26+
background: Colors.green30
2827
},
2928
archive: {
3029
icon: require('../../assets/icons/archive.png'),
3130
text: 'Archive',
32-
background: Colors.blue30,
31+
background: Colors.blue30
3332
},
3433
delete: {
3534
icon: require('../../assets/icons/delete.png'),
3635
text: 'Delete',
37-
background: Colors.red30,
38-
},
36+
background: Colors.red30
37+
}
3938
};
4039

4140
class DrawerScreen extends Component {
@@ -47,7 +46,7 @@ class DrawerScreen extends Component {
4746
showRightItems: true,
4847
fullSwipeRight: true,
4948
showLeftItem: true,
50-
fullSwipeLeft: true,
49+
fullSwipeLeft: true
5150
};
5251
}
5352

@@ -63,14 +62,14 @@ class DrawerScreen extends Component {
6362
LayoutAnimation.configureNext({
6463
update: {
6564
type: LayoutAnimation.Types.easeInEaseOut,
66-
property: LayoutAnimation.Properties.scaleY,
65+
property: LayoutAnimation.Properties.scaleY
6766
},
6867
delete: {
6968
type: LayoutAnimation.Types.easeInEaseOut,
7069
property: LayoutAnimation.Properties.scaleY,
71-
duration: 2000,
70+
duration: 2000
7271
},
73-
duration: 120,
72+
duration: 120
7473
});
7574
this.setState({hideItem: true});
7675
}, 200);
@@ -178,7 +177,7 @@ class DrawerScreen extends Component {
178177
itemsTintColor,
179178
bounciness,
180179
itemsIconSize,
181-
hideItem,
180+
hideItem
182181
} = this.state;
183182

184183
const drawerProps = {
@@ -189,7 +188,7 @@ class DrawerScreen extends Component {
189188
fullSwipeRight,
190189
onFullSwipeRight: this.onFullSwipe,
191190
fullSwipeLeft,
192-
onWillFullSwipeLeft: this.onFullSwipe,
191+
onWillFullSwipeLeft: this.onFullSwipe
193192
};
194193
if (showRightItems) {
195194
drawerProps.rightItems = [ITEMS.read, ITEMS.archive];
@@ -242,13 +241,13 @@ class DrawerScreen extends Component {
242241
min: 5,
243242
max: 15,
244243
step: 1,
245-
initial: 5,
244+
initial: 5
246245
})}
247246
{renderSliderOption.call(this, 'iconSize', 'itemsIconSize', {
248247
min: 15,
249248
max: 25,
250249
step: 1,
251-
initial: 20,
250+
initial: 20
252251
})}
253252
</View>
254253
</ScrollView>
@@ -259,43 +258,43 @@ class DrawerScreen extends Component {
259258

260259
const styles = StyleSheet.create({
261260
container: {
262-
backgroundColor: Colors.white,
261+
backgroundColor: Colors.white
263262
},
264263
contentContainer: {
265-
paddingBottom: 50,
264+
paddingBottom: 50
266265
},
267266
drawer: {
268-
marginTop: 20,
267+
marginTop: 20
269268
},
270269
listContent: {
271-
backgroundColor: Colors.dark80,
270+
backgroundColor: Colors.dark80
272271
},
273272
rowContent: {
274273
flexDirection: 'row',
275274
alignItems: 'center',
276-
backgroundColor: Colors.dark80,
275+
backgroundColor: Colors.dark80
277276
},
278277
rowIcon: {
279278
width: 38,
280279
height: 38,
281280
borderRadius: 19,
282281
backgroundColor: Colors.violet40,
283-
margin: 20,
282+
margin: 20
284283
},
285284
rowTitle: {
286285
...Typography.text70,
287286
fontWeight: 'bold',
288-
color: Colors.dark20,
287+
color: Colors.dark20
289288
},
290289
rowSubtitle: {
291290
...Typography.text80,
292-
color: Colors.dark30,
291+
color: Colors.dark30
293292
},
294293
rowButtonContainer: {
295294
flex: 1,
296295
alignItems: 'flex-end',
297-
padding: 10,
298-
},
296+
padding: 10
297+
}
299298
});
300299

301300
export default gestureHandlerRootHOC(DrawerScreen);

0 commit comments

Comments
 (0)