Skip to content

Commit

Permalink
Remove 'React' global exception from ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrobinson committed Oct 8, 2015
1 parent 60b2ace commit 8cd70a5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"jsx": true
},
"globals": {
"angular": false,
"React": false
"angular": false
},
"env": {
"browser": true
Expand Down
17 changes: 10 additions & 7 deletions frontend/src/card/card.controllers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
import React from "react";

import DataReference from '../query_builder/DataReference.react';
import GuiQueryEditor from '../query_builder/GuiQueryEditor.react';
import NativeQueryEditor from '../query_builder/NativeQueryEditor.react';
import QueryHeader from '../query_builder/QueryHeader.react';
import QueryVisualization from '../query_builder/QueryVisualization.react';

import SavedQuestionsApp from './containers/SavedQuestionsApp.react';

import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import promiseMiddleware from 'redux-promise';
import thunkMidleware from "redux-thunk";
Expand All @@ -7,16 +17,9 @@ import MetabaseAnalytics from '../lib/analytics';
import DataGrid from "metabase/lib/data_grid";
import { addValidOperatorsToFields } from "metabase/lib/schema_metadata";

import DataReference from '../query_builder/DataReference.react';
import GuiQueryEditor from '../query_builder/GuiQueryEditor.react';
import NativeQueryEditor from '../query_builder/NativeQueryEditor.react';
import QueryHeader from '../query_builder/QueryHeader.react';
import QueryVisualization from '../query_builder/QueryVisualization.react';

import Query from "metabase/lib/query";
import { serializeCardForUrl, deserializeCardFromUrl, cleanCopyCard, urlForCardState } from './card.util';

import SavedQuestionsApp from './containers/SavedQuestionsApp.react';
import * as reducers from './reducers';

const finalCreateStore = compose(
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/OnClickOutsideWrapper.react.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React, { Component, PropTypes } from "react";

import OnClickOutside from 'react-onclickoutside';

// this feels a little silly, but we have this component ONLY so that we can add the OnClickOutside functionality on an
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/directives.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from "react";

import { Provider } from 'react-redux';
import { DevTools, DebugPanel } from 'redux-devtools/lib/react';

Expand Down
4 changes: 2 additions & 2 deletions frontend/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import 'ace/snippets/sql';
// clamp
import './vendor/clamp';

// react:
import React from 'react/addons';
// react (unfortunately still required for 'react-onclickoutside')
import React from 'react';
window.React = React;

0 comments on commit 8cd70a5

Please sign in to comment.