diff --git a/.babelrc b/.babelrc index 3ea63de0..e68d2fea 100644 --- a/.babelrc +++ b/.babelrc @@ -1,21 +1,3 @@ { - "presets": ["react"], - "env": { - "commonjs": { - "plugins": [ - "transform-class-properties", - "transform-object-rest-spread" - ], - "presets": ["env"] - }, - "es": { - "plugins": [ - "transform-class-properties", - "transform-object-rest-spread" - ], - "presets": [ - ["env", { "modules": false }] - ] - } - } + "presets": ["es2015", "stage-2", "react"] } diff --git a/package.json b/package.json index a33d20ca..14a5a43b 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,9 @@ "babel-core": "^6.25.0", "babel-eslint": "^7.1.1", "babel-loader": "^6.2.4", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-preset-env": "^1.5.2", + "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", + "babel-preset-stage-2": "^6.24.1", "codeclimate-test-reporter": "^0.4.0", "coveralls": "^2.13.1", "cross-env": "^5.0.1", diff --git a/specs/Modal.spec.js b/specs/Modal.spec.js index 451223ae..f4c160dc 100644 --- a/specs/Modal.spec.js +++ b/specs/Modal.spec.js @@ -3,7 +3,6 @@ import expect from 'expect'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; -import createReactClass from 'create-react-class'; import Modal from '../src/components/Modal'; import * as ariaAppHider from '../src/helpers/ariaAppHider'; import { @@ -57,7 +56,7 @@ describe('State', () => { it('renders into the body, not in context', () => { const node = document.createElement('div'); - const App = createReactClass({ + class App extends Component { render() { return (