Skip to content

Commit

Permalink
Remove unused styles
Browse files Browse the repository at this point in the history
  • Loading branch information
vcalvello committed Nov 2, 2018
1 parent adc8a33 commit 201a694
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 95 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
// The following rules are made available via `eslint-plugin-react-native`

"react-native/no-inline-styles": 1,
"react-native/no-unused-styles": 1,

// Jest Plugin
// The following rules are made available via `eslint-plugin-jest`.
Expand Down
6 changes: 0 additions & 6 deletions Libraries/Inspector/BoxInspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ const styles = StyleSheet.create({
textAlign: 'left',
top: -3,
},
buffer: {
fontSize: 10,
color: 'yellow',
flex: 1,
textAlign: 'center',
},
innerText: {
color: 'yellow',
fontSize: 12,
Expand Down
5 changes: 0 additions & 5 deletions Libraries/Inspector/StyleInspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ const styles = StyleSheet.create({
container: {
flexDirection: 'row',
},
row: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-around',
},
attr: {
fontSize: 10,
color: '#ccc',
Expand Down
4 changes: 0 additions & 4 deletions RNTester/js/AssetScaledImageExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignSelf: 'center',
},
textColumn: {
flex: 1,
flexDirection: 'column',
},
imageWide: {
borderWidth: 1,
borderColor: 'black',
Expand Down
7 changes: 0 additions & 7 deletions RNTester/js/CameraRollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,9 @@ const styles = StyleSheet.create({
flexDirection: 'row',
flex: 1,
},
url: {
fontSize: 9,
marginBottom: 14,
},
image: {
margin: 4,
},
info: {
flex: 1,
},
container: {
flex: 1,
},
Expand Down
6 changes: 0 additions & 6 deletions RNTester/js/ImageCapInsetsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,11 @@ const styles = StyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
},
horizontal: {
flexDirection: 'row',
},
storyBackground: {
width: 250,
height: 150,
borderWidth: 1,
},
text: {
fontSize: 13.5,
},
});

module.exports = ImageCapInsetsExample;
3 changes: 0 additions & 3 deletions RNTester/js/LayoutAnimationExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ const styles = StyleSheet.create({
padding: 10,
marginBottom: 10,
},
buttonText: {
fontSize: 16,
},
viewContainer: {
flex: 1,
flexDirection: 'row',
Expand Down
6 changes: 0 additions & 6 deletions RNTester/js/LinkingExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ class IntentAndroidExample extends React.Component {
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
padding: 10,
paddingTop: 30,
},
button: {
padding: 10,
backgroundColor: '#3B5998',
Expand Down
7 changes: 0 additions & 7 deletions RNTester/js/ListViewPagingExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,6 @@ const styles = StyleSheet.create({
color: 'white',
paddingHorizontal: 8,
},
rowText: {
color: '#888888',
},
thumbText: {
fontSize: 20,
color: '#888888',
},
buttonContents: {
flexDirection: 'row',
justifyContent: 'center',
Expand Down
4 changes: 0 additions & 4 deletions RNTester/js/PermissionsExampleAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: 'white',
},
singleLine: {
fontSize: 16,
padding: 4,
},
text: {
margin: 10,
},
Expand Down
3 changes: 0 additions & 3 deletions RNTester/js/PointerEventsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ const styles = StyleSheet.create({
borderColor: '#f0f0f0',
backgroundColor: '#f9f9f9',
},
bottomSpacer: {
marginBottom: 100,
},
});

exports.framework = 'React';
Expand Down
10 changes: 0 additions & 10 deletions RNTester/js/RNTesterBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ const styles = StyleSheet.create({
descriptionText: {
fontSize: 14,
},
disclosure: {
position: 'absolute',
top: 0,
right: 0,
padding: 10,
},
disclosureIcon: {
width: 12,
height: 8,
},
children: {
margin: 10,
},
Expand Down
4 changes: 0 additions & 4 deletions RNTester/js/SliderExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ class SlidingCompleteExample extends React.Component<
}

const styles = StyleSheet.create({
slider: {
height: 10,
margin: 10,
},
text: {
fontSize: 14,
textAlign: 'center',
Expand Down
5 changes: 0 additions & 5 deletions RNTester/js/StatusBarExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,6 @@ const styles = StyleSheet.create({
backgroundColor: '#eeeeee',
padding: 10,
},
title: {
marginTop: 16,
marginBottom: 8,
fontWeight: 'bold',
},
modalButton: {
marginTop: 10,
},
Expand Down
10 changes: 0 additions & 10 deletions RNTester/js/TextInputExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,6 @@ class AutogrowingTextInputExample extends React.Component<
}

const styles = StyleSheet.create({
page: {
paddingBottom: 300,
},
default: {
borderWidth: StyleSheet.hairlineWidth,
borderColor: '#0f0f0f',
Expand Down Expand Up @@ -520,13 +517,6 @@ const styles = StyleSheet.create({
fontFamily: 'Cochin',
height: 60,
},
multilineChild: {
width: 50,
height: 40,
position: 'absolute',
right: 5,
backgroundColor: 'red',
},
eventLabel: {
margin: 3,
fontSize: 12,
Expand Down
4 changes: 0 additions & 4 deletions RNTester/js/TouchableExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,6 @@ const styles = StyleSheet.create({
justifyContent: 'center',
flexDirection: 'row',
},
icon: {
width: 24,
height: 24,
},
image: {
width: 50,
height: 50,
Expand Down
4 changes: 0 additions & 4 deletions RNTester/js/WebViewExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ const styles = StyleSheet.create({
color: 'white',
fontSize: 13,
},
spinner: {
width: 20,
marginRight: 6,
},
buttons: {
flexDirection: 'row',
height: 30,
Expand Down
10 changes: 10 additions & 0 deletions ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ClippingSample1 extends React.Component {
}
}

/* eslint-disable react-native/no-unused-styles */
var sample1Styles = StyleSheet.create({
outer: {
width: 200,
Expand Down Expand Up @@ -87,6 +88,7 @@ var sample1Styles = StyleSheet.create({
top: 50,
},
});
/* eslint-enable */

class ClippingSample2 extends React.Component {
render() {
Expand Down Expand Up @@ -124,6 +126,7 @@ class ClippingSample2 extends React.Component {
}
}

/* eslint-disable react-native/no-unused-styles */
var sample2Styles = StyleSheet.create({
outer: {
width: 200,
Expand Down Expand Up @@ -161,6 +164,7 @@ var sample2Styles = StyleSheet.create({
bottom: 10,
},
});
/* eslint-enable */

class UpdatingSample1 extends React.Component {
render() {
Expand All @@ -184,6 +188,7 @@ class UpdatingSample1 extends React.Component {
}
}

/* eslint-disable react-native/no-unused-styles */
var updating1Styles = StyleSheet.create({
outer: {
width: 200,
Expand All @@ -207,6 +212,7 @@ var updating1Styles = StyleSheet.create({
backgroundColor: 'green',
},
});
/* eslint-enable */

class UpdatingSample2 extends React.Component {
render() {
Expand All @@ -225,6 +231,7 @@ class UpdatingSample2 extends React.Component {
}
}

/* eslint-disable react-native/no-unused-styles */
var updating2Styles = StyleSheet.create({
outer: {
width: 100,
Expand All @@ -239,6 +246,7 @@ var updating2Styles = StyleSheet.create({
backgroundColor: 'green',
},
});
/* eslint-enable */

class ScrollViewTest extends React.Component {
render() {
Expand Down Expand Up @@ -274,6 +282,7 @@ class ScrollViewTest extends React.Component {
}
}

/* eslint-disable react-native/no-unused-styles */
var scrollTestStyles = StyleSheet.create({
scrollView: {
width: 200,
Expand Down Expand Up @@ -302,6 +311,7 @@ var scrollTestStyles = StyleSheet.create({
borderWidth: 1,
},
});
/* eslint-enable */

var appInstance = null;

Expand Down
7 changes: 0 additions & 7 deletions ReactAndroid/src/androidTest/js/UIManagerTestModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ const FlexTestAppStyles = StyleSheet.create({
child: {
flex: 1,
},
absolute: {
position: 'absolute',
top: 15,
left: 10,
width: 50,
height: 60,
},
bgRed: {
backgroundColor: '#ff0000',
},
Expand Down

0 comments on commit 201a694

Please sign in to comment.