Skip to content

Commit 27b2312

Browse files
committed
fix(jsx): import React because transpiled JSX requires it
1 parent 80b3cc8 commit 27b2312

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.eslintrc

+10-1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
"space-unary-ops": 2,
236236

237237
/* ES6+ */
238+
238239
// disallow using `var`. Must use `let` or `const`
239240
"no-var": 2,
240241
"no-class-assign": 2,
@@ -248,6 +249,11 @@
248249
"arrow-spacing": 2,
249250
"prefer-arrow-callback": 2,
250251
"arrow-parens": [0, "as-needed"],
252+
253+
/* React */
254+
255+
// Prevent React to be incorrectly marked as unused
256+
"react/jsx-uses-react": 2,
251257
},
252258
"env": {
253259
"browser": true,
@@ -258,5 +264,8 @@
258264
},
259265
"ecmaFeatures": {
260266
"jsx": true
261-
}
267+
},
268+
"plugins": [
269+
"react"
270+
]
262271
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"babel-register": "^6.7.2",
7070
"chai": "^3.5.0",
7171
"eslint": "^2.10.2",
72+
"eslint-plugin-react": "5.1.1",
7273
"mocha": "^2.4.5",
7374
"promise": "^7.1.1",
7475
"react": "^15.0.2",

src/dispatchOnMount.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, PropTypes } from 'react';
1+
import React, { Component, PropTypes } from 'react';
22
import { Subscription } from 'rxjs/Subscription';
33

44
const $$reduxObservableSubscription = '@@reduxObservableSubscription';

0 commit comments

Comments
 (0)