From 7e05dcbc2e927e5d16eebcb958f62210b5890409 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 5 Apr 2017 16:28:26 -0400 Subject: [PATCH] Remove the rest of the flow nonsense --- .eslintrc | 3 --- .vscode/settings.json | 9 --------- app/components/Home.js | 2 -- app/containers/App.js | 1 - app/containers/HomePage.js | 1 - app/containers/Root.js | 1 - app/main.development.js | 3 +-- app/menu.js | 1 - app/reducers/index.js | 1 - app/routes.js | 1 - app/store/configureStore.development.js | 4 +--- app/store/configureStore.js | 1 - app/store/configureStore.production.js | 1 - package.json | 11 +---------- 14 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.eslintrc b/.eslintrc index 0da8fdf..7f8fc0d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,7 +10,6 @@ "compat/compat": "error", "consistent-return": "off", "comma-dangle": "off", - "flowtype-errors/show-errors": "error", "generator-star-spacing": "off", "import/no-unresolved": "error", "import/no-extraneous-dependencies": "off", @@ -29,8 +28,6 @@ "react/prefer-stateless-function": "off" }, "plugins": [ - "flowtype", - "flowtype-errors", "import", "promise", "compat", diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index bd76604..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "javascript.validate.enable": false, - "search.exclude": { - ".git": true, - "node_modules": true, - "flow-typed": true, - "bower_components": true - } -} diff --git a/app/components/Home.js b/app/components/Home.js index 4609286..3ac4766 100644 --- a/app/components/Home.js +++ b/app/components/Home.js @@ -1,9 +1,7 @@ -// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './Home.css'; - export default class Home extends Component { render() { return ( diff --git a/app/containers/App.js b/app/containers/App.js index 19f9934..7b0288e 100644 --- a/app/containers/App.js +++ b/app/containers/App.js @@ -1,4 +1,3 @@ -// @flow import React, { Component } from 'react'; import type { Children } from 'react'; diff --git a/app/containers/HomePage.js b/app/containers/HomePage.js index fc70f40..b938e37 100644 --- a/app/containers/HomePage.js +++ b/app/containers/HomePage.js @@ -1,4 +1,3 @@ -// @flow import React, { Component } from 'react'; import Home from '../components/Home'; diff --git a/app/containers/Root.js b/app/containers/Root.js index a26f235..b4fb2b8 100644 --- a/app/containers/Root.js +++ b/app/containers/Root.js @@ -1,4 +1,3 @@ -// @flow import React from 'react'; import { Provider } from 'react-redux'; import { Router } from 'react-router'; diff --git a/app/main.development.js b/app/main.development.js index aba1223..2cd8df0 100644 --- a/app/main.development.js +++ b/app/main.development.js @@ -1,5 +1,4 @@ -/* eslint global-require: 1, flowtype-errors/show-errors: 0 */ -// @flow +/* eslint global-require: 1 */ import { app, BrowserWindow } from 'electron'; import MenuBuilder from './menu'; diff --git a/app/menu.js b/app/menu.js index df3132f..7c77bc6 100644 --- a/app/menu.js +++ b/app/menu.js @@ -1,4 +1,3 @@ -// @flow import { app, Menu, shell, BrowserWindow } from 'electron'; export default class MenuBuilder { diff --git a/app/reducers/index.js b/app/reducers/index.js index 6d700bd..7ce1cd0 100644 --- a/app/reducers/index.js +++ b/app/reducers/index.js @@ -1,4 +1,3 @@ -// @flow import { combineReducers } from 'redux'; import { routerReducer as routing } from 'react-router-redux'; diff --git a/app/routes.js b/app/routes.js index ee07795..a5ae039 100644 --- a/app/routes.js +++ b/app/routes.js @@ -1,4 +1,3 @@ -// @flow import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './containers/App'; diff --git a/app/store/configureStore.development.js b/app/store/configureStore.development.js index 84f5ff2..7491ed4 100644 --- a/app/store/configureStore.development.js +++ b/app/store/configureStore.development.js @@ -5,9 +5,7 @@ import { routerMiddleware, push } from 'react-router-redux'; import { createLogger } from 'redux-logger'; import rootReducer from '../reducers'; - - -export default (initialState: ?counterStateType) => { +export default (initialState = {}) => { // Redux Configuration const middleware = []; const enhancers = []; diff --git a/app/store/configureStore.js b/app/store/configureStore.js index 7120869..eca511f 100644 --- a/app/store/configureStore.js +++ b/app/store/configureStore.js @@ -1,4 +1,3 @@ -// @flow if (process.env.NODE_ENV === 'production') { module.exports = require('./configureStore.production'); // eslint-disable-line global-require } else { diff --git a/app/store/configureStore.production.js b/app/store/configureStore.production.js index c5b421a..09efb98 100644 --- a/app/store/configureStore.production.js +++ b/app/store/configureStore.production.js @@ -1,4 +1,3 @@ -// @flow import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import { hashHistory } from 'react-router'; diff --git a/package.json b/package.json index 8a57371..1994039 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "main.js", "scripts": { "test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js", - "test-all": "npm run lint && npm run flow && npm run test && npm run build", + "test-all": "npm run lint && npm run test && npm run build", "test-watch": "npm test -- --watch", "test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js e2e", "lint": "eslint --cache --format=node_modules/eslint-formatter-pretty .", @@ -17,8 +17,6 @@ "build-main": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --progress --profile --colors", "build-renderer": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --progress --profile --colors", "start": "cross-env NODE_ENV=production electron ./app/", - "flow": "flow", - "flow-typed": "flow-typed install", "start-hot-renderer": "cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development", "postinstall": "concurrently \"npm run build-dll\" \"install-app-deps\" \"node node_modules/fbjs-scripts/node/check-dev-engines.js package.json\"", "dev": "cross-env START_HOT=1 npm run hot-updates-server", @@ -80,15 +78,11 @@ "url": "https://github.com/chentsulin" }, "license": "MIT", - "bugs": { - "url": "https://github.com/chentsulin/electron-react-boilerplate/issues" - }, "keywords": [ "electron", "boilerplate", "react", "redux", - "flow", "sass", "webpack", "hot", @@ -119,7 +113,6 @@ "babel-loader": "^6.4.1", "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-dev-expression": "^0.2.1", - "babel-plugin-flow-runtime": "^0.10.0", "babel-plugin-transform-class-properties": "^6.23.0", "babel-plugin-transform-es2015-classes": "^6.23.0", "babel-polyfill": "^6.23.0", @@ -146,8 +139,6 @@ "eslint-formatter-pretty": "^1.1.0", "eslint-import-resolver-webpack": "^0.8.1", "eslint-plugin-compat": "^1.0.2", - "eslint-plugin-flowtype": "^2.30.4", - "eslint-plugin-flowtype-errors": "^3.0.3", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jest": "^19.0.1", "eslint-plugin-jsx-a11y": "^4.0.0",