File tree Expand file tree Collapse file tree 4 files changed +1503
-55
lines changed Expand file tree Collapse file tree 4 files changed +1503
-55
lines changed Original file line number Diff line number Diff line change 16
16
"ava" : " ^0.17.0" ,
17
17
"babel-cli" : " ^6.18.0" ,
18
18
"babel-core" : " ^6.18.2" ,
19
+ "babel-plugin-transform-runtime" : " ^6.15.0" ,
19
20
"babel-polyfill" : " ^6.16.0" ,
20
21
"babel-preset-es2015" : " ^6.16.0" ,
21
22
"babel-preset-react" : " ^6.16.0" ,
57
58
" browser"
58
59
],
59
60
"rules" : {
61
+ "eqeqeq" : [
62
+ " error" ,
63
+ " always" ,
64
+ {
65
+ "null" : " ignore"
66
+ }
67
+ ],
68
+ "no-eq-null" : 0 ,
60
69
"import/no-unresolved" : 0 ,
61
70
"new-cap" : 0
62
71
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default function ({types: t}) {
29
29
visitor : {
30
30
JSXOpeningElement ( path , state ) {
31
31
if ( state . hasJSXStyle ) {
32
- if ( state . ignoreClosing === null ) {
32
+ if ( state . ignoreClosing == null ) {
33
33
// this flag has a two-fold purpose:
34
34
// - ignore the opening tag of the parent element
35
35
// of the style tag, since we don't want to add
@@ -64,7 +64,7 @@ export default function ({types: t}) {
64
64
} ,
65
65
JSXElement : {
66
66
enter ( path , state ) {
67
- if ( state . hasJSXStyle === null ) {
67
+ if ( state . hasJSXStyle == null ) {
68
68
const styles = findStyles ( path . node . children )
69
69
70
70
if ( styles . length > 0 ) {
Original file line number Diff line number Diff line change @@ -6,13 +6,14 @@ import test from 'ava'
6
6
import { transformFile } from 'babel-core'
7
7
8
8
// Ours
9
- import plugin from '../dist /babel'
9
+ import plugin from '../src /babel'
10
10
import read from './_read'
11
11
12
12
const transform = file => (
13
13
new Promise ( ( resolve , reject ) => {
14
14
transformFile ( path . resolve ( __dirname , file ) , {
15
15
plugins : [
16
+ 'transform-runtime' ,
16
17
plugin
17
18
]
18
19
} , ( err , data ) => {
You can’t perform that action at this time.
0 commit comments