@@ -112,7 +112,7 @@ const tests = {
112112 });
113113 const Hello = React.createClass({
114114 getInitialState: function() {
115- return { condition: true, condition2: true };
115+ return { condition: true, condition2: true };
116116 },
117117 render: function() {
118118 return (
@@ -135,7 +135,7 @@ const tests = {
135135 });
136136 const Hello = React.createClass({
137137 getInitialState: function() {
138- return { condition: true };
138+ return { condition: true };
139139 },
140140 render: function() {
141141 return (
@@ -175,7 +175,7 @@ const tests = {
175175 code : `
176176 const Hello = React.createClass({
177177 getInitialState: function() {
178- return { condition: true };
178+ return { condition: true };
179179 },
180180 render: function() {
181181 const myStyle = this.state.condition ? styles.text : styles.text2;
@@ -276,6 +276,16 @@ const tests = {
276276 errors : [ {
277277 message : 'Unused style detected: styles.bar' ,
278278 } ] ,
279+ } , {
280+ code : `
281+ const styles = StyleSheet.create({
282+ text: {}
283+ })
284+ const Hello = () => (<><Text style={styles.b}>Hello</Text></>);
285+ ` ,
286+ errors : [ {
287+ message : 'Unused style detected: styles.text' ,
288+ } ] ,
279289 } ] ,
280290} ;
281291
0 commit comments