Skip to content

Commit d5d823e

Browse files
committed
fix everything
1 parent 5c614c5 commit d5d823e

File tree

4 files changed

+1503
-55
lines changed

4 files changed

+1503
-55
lines changed

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"ava": "^0.17.0",
1717
"babel-cli": "^6.18.0",
1818
"babel-core": "^6.18.2",
19+
"babel-plugin-transform-runtime": "^6.15.0",
1920
"babel-polyfill": "^6.16.0",
2021
"babel-preset-es2015": "^6.16.0",
2122
"babel-preset-react": "^6.16.0",
@@ -57,6 +58,14 @@
5758
"browser"
5859
],
5960
"rules": {
61+
"eqeqeq": [
62+
"error",
63+
"always",
64+
{
65+
"null": "ignore"
66+
}
67+
],
68+
"no-eq-null": 0,
6069
"import/no-unresolved": 0,
6170
"new-cap": 0
6271
}

src/babel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function ({types: t}) {
2929
visitor: {
3030
JSXOpeningElement(path, state) {
3131
if (state.hasJSXStyle) {
32-
if (state.ignoreClosing === null) {
32+
if (state.ignoreClosing == null) {
3333
// this flag has a two-fold purpose:
3434
// - ignore the opening tag of the parent element
3535
// of the style tag, since we don't want to add
@@ -64,7 +64,7 @@ export default function ({types: t}) {
6464
},
6565
JSXElement: {
6666
enter(path, state) {
67-
if (state.hasJSXStyle === null) {
67+
if (state.hasJSXStyle == null) {
6868
const styles = findStyles(path.node.children)
6969

7070
if (styles.length > 0) {

test/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import test from 'ava'
66
import {transformFile} from 'babel-core'
77

88
// Ours
9-
import plugin from '../dist/babel'
9+
import plugin from '../src/babel'
1010
import read from './_read'
1111

1212
const transform = file => (
1313
new Promise((resolve, reject) => {
1414
transformFile(path.resolve(__dirname, file), {
1515
plugins: [
16+
'transform-runtime',
1617
plugin
1718
]
1819
}, (err, data) => {

0 commit comments

Comments
 (0)