@@ -42,29 +42,29 @@ ruleTester.run('jsx-no-undef', rule, {
42
42
} , {
43
43
code : '/*eslint no-undef:1*/ var React, app; React.render(<app.foo.Bar />);'
44
44
} , {
45
- code : [
46
- ' /*eslint no-undef:1*/' ,
47
- ' var React;' ,
48
- ' class Hello extends React.Component {' ,
49
- ' render() {' ,
50
- ' return <this.props.tag />' ,
51
- ' }' ,
52
- '}'
53
- ] . join ( '\n' )
45
+ code : `
46
+ /*eslint no-undef:1*/
47
+ var React;
48
+ class Hello extends React.Component {
49
+ render() {
50
+ return <this.props.tag />
51
+ }
52
+ }
53
+ `
54
54
} , {
55
55
code : 'var React; React.render(<Text />);' ,
56
56
globals : {
57
57
Text : true
58
58
}
59
59
} , {
60
- code : [
61
- ' import Text from "cool-module";' ,
62
- ' const TextWrapper = function (props) {' ,
63
- ' return (' ,
64
- ' <Text />' ,
65
- ' );' ,
66
- '};'
67
- ] . join ( '\n' ) ,
60
+ code : `
61
+ import Text from "cool-module";
62
+ const TextWrapper = function (props) {
63
+ return (
64
+ <Text />
65
+ );
66
+ };
67
+ ` ,
68
68
parserOptions : Object . assign ( { sourceType : 'module' } , parserOptions ) ,
69
69
options : [ {
70
70
allowGlobals : false
@@ -97,14 +97,14 @@ ruleTester.run('jsx-no-undef', rule, {
97
97
message : '\'appp\' is not defined.'
98
98
} ]
99
99
} , {
100
- code : [
101
- ' const TextWrapper = function (props) {' ,
102
- ' return (' ,
103
- ' <Text />' ,
104
- ' );' ,
105
- '};' ,
106
- ' export default TextWrapper;'
107
- ] . join ( '\n' ) ,
100
+ code : `
101
+ const TextWrapper = function (props) {
102
+ return (
103
+ <Text />
104
+ );
105
+ };
106
+ export default TextWrapper;
107
+ ` ,
108
108
parserOptions : Object . assign ( { sourceType : 'module' } , parserOptions ) ,
109
109
errors : [ {
110
110
message : '\'Text\' is not defined.'
0 commit comments