Fix linting errors and warnings

This commit is contained in:
Andrew Nicolaou 2019-09-08 16:43:16 +02:00
parent b1bfb91f80
commit 7ea4ae5637
6 changed files with 16 additions and 20 deletions

View file

@ -1,5 +1,4 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { browserHistory } from 'react-router'; import { browserHistory } from 'react-router';
@ -23,6 +22,6 @@ function mapStateToProps(state) {
const ConnectedRedirectToUser = connect(mapStateToProps)(RedirectToUser); const ConnectedRedirectToUser = connect(mapStateToProps)(RedirectToUser);
const createRedirectWithUsername = (url) => (props) => <ConnectedRedirectToUser {...props} url={url} />; const createRedirectWithUsername = url => props => <ConnectedRedirectToUser {...props} url={url} />;
export default createRedirectWithUsername; export default createRedirectWithUsername;

View file

@ -39,7 +39,10 @@ class App extends React.Component {
App.propTypes = { App.propTypes = {
children: PropTypes.element, children: PropTypes.element,
location: PropTypes.shape({ location: PropTypes.shape({
pathname: PropTypes.string pathname: PropTypes.string,
state: PropTypes.shape({
skipSavingPath: PropTypes.bool,
}),
}).isRequired, }).isRequired,
setPreviousPath: PropTypes.func.isRequired, setPreviousPath: PropTypes.func.isRequired,
}; };

View file

@ -1,6 +1,5 @@
import { browserHistory } from 'react-router'; import { browserHistory } from 'react-router';
import axios from 'axios'; import axios from 'axios';
import crypto from 'crypto';
import * as ActionTypes from '../../constants'; import * as ActionTypes from '../../constants';
import { showErrorModal, justOpenedProject } from '../IDE/actions/ide'; import { showErrorModal, justOpenedProject } from '../IDE/actions/ide';
import { showToast, setToastText } from '../IDE/actions/toast'; import { showToast, setToastText } from '../IDE/actions/toast';

View file

@ -27,8 +27,7 @@ Tab.propTypes = {
to: PropTypes.string.isRequired, to: PropTypes.string.isRequired,
}; };
const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => { const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => (
return (
<ul className="dashboard-header__switcher"> <ul className="dashboard-header__switcher">
<div className="dashboard-header__tabs"> <div className="dashboard-header__tabs">
<Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab> <Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab>
@ -36,7 +35,6 @@ const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
</div> </div>
</ul> </ul>
); );
};
DashboardTabSwitcher.propTypes = { DashboardTabSwitcher.propTypes = {
currentTab: PropTypes.string.isRequired, currentTab: PropTypes.string.isRequired,

View file

@ -4,7 +4,6 @@ import { reduxForm } from 'redux-form';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { browserHistory } from 'react-router'; import { browserHistory } from 'react-router';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import InlineSVG from 'react-inlinesvg';
import axios from 'axios'; import axios from 'axios';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions'; import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
@ -14,8 +13,6 @@ import GithubButton from '../components/GithubButton';
import APIKeyForm from '../components/APIKeyForm'; import APIKeyForm from '../components/APIKeyForm';
import NavBasic from '../../../components/NavBasic'; import NavBasic from '../../../components/NavBasic';
const exitUrl = require('../../../images/exit.svg');
class AccountView extends React.Component { class AccountView extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);

View file

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { browserHistory, Link } from 'react-router'; import { browserHistory } from 'react-router';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions'; import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
import NavBasic from '../../../components/NavBasic'; import NavBasic from '../../../components/NavBasic';