3
3
* @author Glen Mailer
4
4
*/
5
5
6
- " use strict" ;
6
+ ' use strict' ;
7
7
8
8
// -----------------------------------------------------------------------------
9
9
// Requirements
@@ -17,21 +17,21 @@ var ESLintTester = require('eslint-tester');
17
17
// -----------------------------------------------------------------------------
18
18
19
19
var eslintTester = new ESLintTester ( eslint ) ;
20
- eslintTester . addRuleTest ( " lib/rules/react-in-jsx-scope" , {
20
+ eslintTester . addRuleTest ( ' lib/rules/react-in-jsx-scope' , {
21
21
valid : [
22
- { code : " var React, App; <App />;" , args : [ 1 , { vars : " all" } ] , ecmaFeatures : { jsx : true } } ,
23
- { code : " var React; <img />;" , args : [ 1 , { vars : " all" } ] , ecmaFeatures : { jsx : true } } ,
24
- { code : " var React; <x-gif />;" , args : [ 1 , { vars : " all" } ] , ecmaFeatures : { jsx : true } } ,
25
- { code : " var React, App, a=1; <App attr={a} />;" , ecmaFeatures : { jsx : true } } ,
26
- { code : " var React, App, a=1; function elem() { return <App attr={a} />; }" ,
22
+ { code : ' var React, App; <App />;' , args : [ 1 , { vars : ' all' } ] , ecmaFeatures : { jsx : true } } ,
23
+ { code : ' var React; <img />;' , args : [ 1 , { vars : ' all' } ] , ecmaFeatures : { jsx : true } } ,
24
+ { code : ' var React; <x-gif />;' , args : [ 1 , { vars : ' all' } ] , ecmaFeatures : { jsx : true } } ,
25
+ { code : ' var React, App, a=1; <App attr={a} />;' , ecmaFeatures : { jsx : true } } ,
26
+ { code : ' var React, App, a=1; function elem() { return <App attr={a} />; }' ,
27
27
ecmaFeatures : { jsx : true } }
28
28
] ,
29
29
invalid : [
30
- { code : " var App, a = <App />;" ,
31
- errors : [ { message : "' React' must be in scope when using JSX" } ] , ecmaFeatures : { jsx : true } } ,
32
- { code : " var a = <App />;" ,
33
- errors : [ { message : "' React' must be in scope when using JSX" } ] , ecmaFeatures : { jsx : true } } ,
34
- { code : " var a = <img />;" ,
35
- errors : [ { message : "' React' must be in scope when using JSX" } ] , ecmaFeatures : { jsx : true } }
30
+ { code : ' var App, a = <App />;' ,
31
+ errors : [ { message : '\' React\ ' must be in scope when using JSX' } ] , ecmaFeatures : { jsx : true } } ,
32
+ { code : ' var a = <App />;' ,
33
+ errors : [ { message : '\' React\ ' must be in scope when using JSX' } ] , ecmaFeatures : { jsx : true } } ,
34
+ { code : ' var a = <img />;' ,
35
+ errors : [ { message : '\' React\ ' must be in scope when using JSX' } ] , ecmaFeatures : { jsx : true } }
36
36
]
37
37
} ) ;
0 commit comments