diff --git a/package.json b/package.json index b07df6afb..0ec4b5120 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "ansi_up": "^1.3.0", "asap": "^2.0.4", "babel-eslint": "^7.0.0", + "babel-plugin-dev": "^1.0.0", "babel-plugin-lodash": "^3.2.11", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-react-constant-elements": "^6.5.0", @@ -169,6 +170,7 @@ } }, "plugins": [ + "dev", "transform-decorators-legacy", "transform-runtime" ], @@ -184,6 +186,9 @@ ] }, "standard": { + "globals": [ + "__DEV__" + ], "ignore": [ "dist" ], diff --git a/src/common/auto-controlled-input.js b/src/common/auto-controlled-input.js index 07213d67d..d4c1ea813 100644 --- a/src/common/auto-controlled-input.js +++ b/src/common/auto-controlled-input.js @@ -4,8 +4,6 @@ import { isFunction, omit } from 'lodash' import Component from './base-component' import getEventValue from './get-event-value' -const __DEV__ = process.env.NODE_ENV !== 'production' - // This decorator can be used on a controlled input component to make // it able to automatically handled the uncontrolled mode. export default options => ControlledInput => { diff --git a/src/common/select-objects.js b/src/common/select-objects.js index b508e1b9b..652a5b2ec 100644 --- a/src/common/select-objects.js +++ b/src/common/select-objects.js @@ -180,7 +180,6 @@ export class GenericSelect extends Component { () => this.props.xoContainers, () => this.props.xoObjects, (containers, objects) => { // createCollectionWrapper with a depth? - const __DEV__ = process.env.NODE_ENV !== 'production' const { name } = this.constructor if (!containers) { diff --git a/yarn.lock b/yarn.lock index ed8bf09e4..da8f29460 100644 --- a/yarn.lock +++ b/yarn.lock @@ -497,6 +497,10 @@ babel-plugin-check-es2015-constants@^6.3.13: dependencies: babel-runtime "^6.0.0" +babel-plugin-dev@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dev/-/babel-plugin-dev-1.0.0.tgz#6b1baeadc1740fc894082a450d297e49469dd0de" + babel-plugin-istanbul@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.0.0.tgz#36bde8fbef4837e5ff0366531a2beabd7b1ffa10"