Skip to content

Commit

Permalink
Remove Flow (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya authored Jul 19, 2019
1 parent a387c54 commit 0d40ff5
Show file tree
Hide file tree
Showing 79 changed files with 50 additions and 267 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"extends": ["eslint-config-react-app", "prettier"],
"plugins": ["flowtype"]
"extends": ["eslint-config-react-app", "prettier"]
}
18 changes: 0 additions & 18 deletions .flowconfig

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ build/

# Dependencies
node_modules/
flow-typed/

# Testing
coverage/
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"editor.formatOnSave": true,
"flow.useNPMPackagedFlow": true,
"javascript.format.enable": false,
"javascript.validate.enable": false,
"vsicons.presets.angular": false,
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Also, you need to be familiar with [HTML][html], [CSS][css], [JavaScript][js] ([
- [Node.js][nodejs] v10.15 or higher + [Yarn][yarn] v1.17 or higher   (_HINT: On Mac install
them via [Brew][brew]_)
- [VS Code][vc] editor (preferred) + [Project Snippets][vcsnippets], [EditorConfig][vceditconfig],
[ESLint][vceslint], [Flow][vcflow], [Prettier][vcprettier], and [Babel JavaScript][vcjs] plug-ins
[ESLint][vceslint], [Prettier][vcprettier], and [Babel JavaScript][vcjs] plug-ins
- [Watchman][watchman] file watcher used by Relay Modern
- [PostgreSQL][postgres] v9.6 or newer, only if you're planning to use a local db for development

Expand Down Expand Up @@ -232,7 +232,6 @@ and [contributors](https://github.com/kriasoft/react-firebase-starter/graphs/con
[vcsnippets]: https://marketplace.visualstudio.com/items?itemName=rebornix.project-snippets
[vceditconfig]: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
[vceslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
[vcflow]: https://marketplace.visualstudio.com/items?itemName=flowtype.flow-for-vscode
[vcprettier]: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
[vcjs]: https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
[watchman]: https://github.com/facebook/watchman
Expand Down
1 change: 0 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
".env.local",
".env.*.local",
".eslintrc",
".flowconfig",
".gitattributes",
".gitignore",
".prettierignore",
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-flow": "^7.0.0",
"@babel/register": "^7.0.0",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-relay": "^5.0.0",
"chai": "^4.2.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-flowtype": "^3.10.3",
"eslint-plugin-prettier": "^3.1.0",
"flow-bin": "^0.103.0",
"husky": "^3.0.1",
"lint-staged": "^9.2.0",
"minimist": "^1.2.0",
Expand Down
2 changes: 0 additions & 2 deletions src/admin/AdminLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { createFragmentContainer, graphql } from 'react-relay';

Expand Down
6 changes: 2 additions & 4 deletions src/admin/AdminStoryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import List from '@material-ui/core/List';
Expand All @@ -14,14 +12,14 @@ import { createFragmentContainer, graphql } from 'react-relay';

function AdminStoryList(props) {
return (
<>
<React.Fragment>
<Typography variant="h3">Stories</Typography>
<List>
<ListItem>Story A</ListItem>
<ListItem>Story B</ListItem>
<ListItem>Story C</ListItem>
</List>
</>
</React.Fragment>
);
}

Expand Down
6 changes: 2 additions & 4 deletions src/admin/AdminUserList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import List from '@material-ui/core/List';
Expand All @@ -14,14 +12,14 @@ import { createFragmentContainer, graphql } from 'react-relay';

function AdminUserList(props) {
return (
<>
<React.Fragment>
<Typography variant="h3">Users</Typography>
<List>
<ListItem>User A</ListItem>
<ListItem>User B</ListItem>
<ListItem>User C</ListItem>
</List>
</>
</React.Fragment>
);
}

Expand Down
2 changes: 0 additions & 2 deletions src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { graphql } from 'relay-runtime';
import AdminLayout from './AdminLayout';
Expand Down
2 changes: 0 additions & 2 deletions src/common/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { QueryRenderer } from 'react-relay';
import { ThemeProvider } from '@material-ui/styles';
Expand Down
2 changes: 0 additions & 2 deletions src/common/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

it('renders without crashing', () => {
// TODO: Implement a unit test
});
9 changes: 1 addition & 8 deletions src/common/AutoUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,14 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { graphql, createFragmentContainer, commitMutation } from 'react-relay';
import type { AutoUpdater_user } from './__generated__/AutoUpdater_user.graphql';

type Props = {
user: AutoUpdater_user,
};

/**
* Checks if user's profile settings (time zone etc.) are up-to-date,
* and updates these fields in the background when they become outdated.
*/
class AutoUpdater extends React.Component<Props> {
class AutoUpdater extends React.Component {
componentDidMount() {
this.updateUser();
}
Expand Down
2 changes: 0 additions & 2 deletions src/common/ErrorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/styles';
Expand Down
2 changes: 0 additions & 2 deletions src/common/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { makeStyles } from '@material-ui/styles';
import { createFragmentContainer, graphql } from 'react-relay';
Expand Down
2 changes: 0 additions & 2 deletions src/common/LayoutFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/styles';
Expand Down
2 changes: 0 additions & 2 deletions src/common/LayoutToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import clsx from 'clsx';
import React, { useState } from 'react';
import AppBar from '@material-ui/core/AppBar';
Expand Down
2 changes: 0 additions & 2 deletions src/common/LayoutToolbarMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
Expand Down
4 changes: 1 addition & 3 deletions src/common/LoginButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import clsx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -65,7 +63,7 @@ const styles = {
},
};

class LoginButton extends React.PureComponent<any> {
class LoginButton extends React.PureComponent {
static propTypes = {
provider: PropTypes.oneOf(Object.keys(providers)),
};
Expand Down
2 changes: 0 additions & 2 deletions src/common/LoginLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';

import Link from './Link';
Expand Down
2 changes: 0 additions & 2 deletions src/common/LogoutLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';

import Link from './Link';
Expand Down
2 changes: 0 additions & 2 deletions src/common/withAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { wrapDisplayName } from 'recompose';
Expand Down
2 changes: 0 additions & 2 deletions src/createRelay.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import { Environment, Network, RecordSource, Store } from 'relay-runtime';
import loading from './utils/loading';

Expand Down
2 changes: 0 additions & 2 deletions src/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React, { useContext, useEffect } from 'react';
import { ReactRelayContext } from 'react-relay';
import { fb } from './utils';
Expand Down
2 changes: 0 additions & 2 deletions src/icons/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';

Expand Down
2 changes: 0 additions & 2 deletions src/icons/Google.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';

Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import ReactDOM from 'react-dom';
import qs from 'query-string';
Expand Down
2 changes: 0 additions & 2 deletions src/landing/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
Expand Down
2 changes: 0 additions & 2 deletions src/landing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { graphql } from 'relay-runtime';
import Layout from '../common/Layout';
Expand Down
2 changes: 0 additions & 2 deletions src/legal/Privacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/styles';
Expand Down
2 changes: 0 additions & 2 deletions src/legal/Terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core';
Expand Down
2 changes: 0 additions & 2 deletions src/legal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { graphql } from 'relay-runtime';
import Layout from '../common/Layout';
Expand Down
2 changes: 0 additions & 2 deletions src/misc/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/styles';
Expand Down
2 changes: 0 additions & 2 deletions src/misc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (c) 2015-present Kriasoft | MIT License
*/

/* @flow */

import React from 'react';
import { graphql } from 'relay-runtime';
import Layout from '../common/Layout';
Expand Down
Loading

0 comments on commit 0d40ff5

Please sign in to comment.