diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..f924cf05ca --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,46 @@ +module.exports = { + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parserOptions": { + "ecmaFeatures": { + "experimentalObjectRestSpread": true, + "jsx": true + }, + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules": { + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ], + "comma-dangle": [ + "error", + "always-multiline" + ] + }, + "settings": { + "react": { + "pragma": "React", + "version": "15.0" + } + } +}; \ No newline at end of file diff --git a/index.js b/index.js index 5ccc485208..8a73137ebd 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,6 @@ import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; -import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import { AppContainer } from 'react-hot-loader'; @@ -9,7 +8,7 @@ import { AppContainer } from 'react-hot-loader'; import rootReducer from './src/reducers'; import Root from './src/containers/Root'; -window.geckoProfilerPromise = new Promise(function (resolve, reject) { +window.geckoProfilerPromise = new Promise(function (resolve) { window.connectToGeckoProfiler = resolve; }); diff --git a/package.json b/package.json index e17473d17c..10ae63c42d 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,9 @@ "bisection": "0.0.3", "browserify": "^12.0.1", "chai": "^3.5.0", + "eslint": "^2.9.0", + "eslint-config-google": "^0.5.0", + "eslint-plugin-react": "^5.1.1", "express": "^4.13.4", "live-server": "^0.8.2", "memoizesync": "^0.5.0",