lint: fix eof char
This commit is contained in:
parent
18cc5a7e16
commit
698bfe6280
|
@ -22,9 +22,5 @@ export const LayoutComponent = (props: Props) => {
|
|||
// $FlowFixMe
|
||||
const { children } = props; // eslint-disable-line
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
{children}
|
||||
</Layout>
|
||||
);
|
||||
return <Layout>{children}</Layout>;
|
||||
};
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
// @flow
|
||||
|
||||
import {
|
||||
DASHBOARD_ROUTE,
|
||||
SEND_ROUTE,
|
||||
RECEIVE_ROUTE,
|
||||
SETTINGS_ROUTE,
|
||||
DASHBOARD_ROUTE, SEND_ROUTE, RECEIVE_ROUTE, SETTINGS_ROUTE,
|
||||
} from './routes';
|
||||
|
||||
export const MENU_OPTIONS = [
|
||||
|
|
|
@ -9,25 +9,15 @@ import { createRootReducer } from './modules/reducer';
|
|||
|
||||
export const history = createBrowserHistory();
|
||||
|
||||
const shouldEnableDevTools = (
|
||||
process.env.NODE_ENV !== 'production'
|
||||
|| process.env.NODE_ENV !== 'staging'
|
||||
) && window.devToolsExtension;
|
||||
const shouldEnableDevTools = (process.env.NODE_ENV !== 'production' || process.env.NODE_ENV !== 'staging') && window.devToolsExtension;
|
||||
|
||||
export const configureStore = (initialState: Object) => {
|
||||
const middleware = applyMiddleware(
|
||||
thunk,
|
||||
routerMiddleware(history),
|
||||
);
|
||||
const middleware = applyMiddleware(thunk, routerMiddleware(history));
|
||||
|
||||
const enhancer = compose(
|
||||
middleware,
|
||||
shouldEnableDevTools ? window.devToolsExtension() : f => f,
|
||||
);
|
||||
|
||||
return createStore(
|
||||
createRootReducer(history),
|
||||
initialState,
|
||||
enhancer,
|
||||
);
|
||||
return createStore(createRootReducer(history), initialState, enhancer);
|
||||
};
|
||||
|
|
|
@ -52,10 +52,7 @@ export const updateTodo = (id: string, text: string) => ({
|
|||
const initialState = [];
|
||||
|
||||
// Reducers
|
||||
export default (
|
||||
state: Array<TodoType> = initialState,
|
||||
action: Action,
|
||||
): Array<TodoType> => {
|
||||
export default (state: Array<TodoType> = initialState, action: Action): Array<TodoType> => {
|
||||
switch (action.type) {
|
||||
case ADD_TODO:
|
||||
return [...state, action.payload];
|
||||
|
|
|
@ -9,7 +9,9 @@ const mapStateToProps = (state: AppState) => ({
|
|||
todos: state.todos,
|
||||
});
|
||||
|
||||
export const Router = withRouter(connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(RouterComponent));
|
||||
export const Router = withRouter(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(RouterComponent),
|
||||
);
|
||||
|
|
|
@ -12,10 +12,7 @@ import { SettingsView } from '../views/settings';
|
|||
import { NotFoundView } from '../views/not-found';
|
||||
import { LayoutComponent } from '../components/layout';
|
||||
import {
|
||||
DASHBOARD_ROUTE,
|
||||
SEND_ROUTE,
|
||||
RECEIVE_ROUTE,
|
||||
SETTINGS_ROUTE,
|
||||
DASHBOARD_ROUTE, SEND_ROUTE, RECEIVE_ROUTE, SETTINGS_ROUTE,
|
||||
} from '../constants/routes';
|
||||
|
||||
export const RouterComponent = () => (
|
||||
|
@ -25,23 +22,10 @@ export const RouterComponent = () => (
|
|||
{/* $FlowFixMe */}
|
||||
<LayoutComponent>
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
path={DASHBOARD_ROUTE}
|
||||
component={DashboardView}
|
||||
/>
|
||||
<Route
|
||||
path={SEND_ROUTE}
|
||||
component={SendView}
|
||||
/>
|
||||
<Route
|
||||
path={RECEIVE_ROUTE}
|
||||
component={ReceiveView}
|
||||
/>
|
||||
<Route
|
||||
path={SETTINGS_ROUTE}
|
||||
component={SettingsView}
|
||||
/>
|
||||
<Route exact path={DASHBOARD_ROUTE} component={DashboardView} />
|
||||
<Route path={SEND_ROUTE} component={SendView} />
|
||||
<Route path={RECEIVE_ROUTE} component={ReceiveView} />
|
||||
<Route path={SETTINGS_ROUTE} component={SettingsView} />
|
||||
<Route component={NotFoundView} />
|
||||
</Switch>
|
||||
</LayoutComponent>
|
||||
|
|
|
@ -4,9 +4,9 @@ import { PureComponent } from 'react';
|
|||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
type Props = {
|
||||
location: Object;
|
||||
location: Object,
|
||||
children: any,
|
||||
}
|
||||
};
|
||||
|
||||
class ScrollTop extends PureComponent<Props> {
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
|
|
|
@ -28,11 +28,7 @@ const appTheme = {
|
|||
|
||||
/* eslint-disable react/prop-types */
|
||||
// $FlowFixMe
|
||||
export const DoczWrapper = ({ children }) => (
|
||||
<ThemeProvider theme={appTheme}>
|
||||
{children()}
|
||||
</ThemeProvider>
|
||||
);
|
||||
export const DoczWrapper = ({ children }) => <ThemeProvider theme={appTheme}>{children()}</ThemeProvider>;
|
||||
|
||||
export const GlobalStyle = createGlobalStyle`${normalize()}`;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
|
||||
type State = {| |};
|
||||
type State = {||};
|
||||
|
||||
export type Action = { type: $Subtype<string>, payload: Object };
|
||||
export type GetState = () => State;
|
||||
|
|
|
@ -4,5 +4,5 @@ export type TodoType = {
|
|||
id: string,
|
||||
text: string,
|
||||
editing: boolean,
|
||||
createdAt: number
|
||||
createdAt: number,
|
||||
};
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
export const DashboardView = () => (
|
||||
<div className='dashboard'>
|
||||
dashboard
|
||||
</div>
|
||||
);
|
||||
export const DashboardView = () => <div className='dashboard'>dashboard</div>;
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
export const NotFoundView = () => (
|
||||
<div className='not found'>
|
||||
not found
|
||||
</div>
|
||||
);
|
||||
export const NotFoundView = () => <div className='not found'>not found</div>;
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
export const ReceiveView = () => (
|
||||
<div className='send'>
|
||||
receive
|
||||
</div>
|
||||
);
|
||||
export const ReceiveView = () => <div className='send'>receive</div>;
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
export const SendView = () => (
|
||||
<div className='send'>
|
||||
send
|
||||
</div>
|
||||
);
|
||||
export const SendView = () => <div className='send'>send</div>;
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
export const SettingsView = () => (
|
||||
<div className='settings'>
|
||||
settings
|
||||
</div>
|
||||
);
|
||||
export const SettingsView = () => <div className='settings'>settings</div>;
|
||||
|
|
|
@ -20,25 +20,14 @@ type Props = {
|
|||
|
||||
export default (props: Props) => {
|
||||
const {
|
||||
addTodo,
|
||||
todos,
|
||||
deleteTodo,
|
||||
toggleEdit,
|
||||
updateTodo,
|
||||
cancelUpdateTodo,
|
||||
addTodo, todos, deleteTodo, toggleEdit, updateTodo, cancelUpdateTodo,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<div className='todo'>
|
||||
<div className='todo__heading'>
|
||||
<img
|
||||
src={checklist}
|
||||
alt='Testing File Loader'
|
||||
className='todo__image'
|
||||
/>
|
||||
<h1 className='todo__header'>
|
||||
Todo List App
|
||||
</h1>
|
||||
<img src={checklist} alt='Testing File Loader' className='todo__image' />
|
||||
<h1 className='todo__header'>Todo List App</h1>
|
||||
</div>
|
||||
<TodoInput addTodo={addTodo} />
|
||||
<TodoList
|
||||
|
|
|
@ -7,9 +7,7 @@ module.exports = {
|
|||
index: './app/index.js',
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJSPlugin({ sourceMap: true }),
|
||||
],
|
||||
minimizer: [new UglifyJSPlugin({ sourceMap: true })],
|
||||
},
|
||||
devtool: 'cheap-module-source-map',
|
||||
module: {
|
||||
|
@ -23,21 +21,28 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [{
|
||||
loader: 'style-loader',
|
||||
}, {
|
||||
loader: 'css-loader',
|
||||
}, {
|
||||
loader: 'postcss-loader',
|
||||
ident: 'postcss',
|
||||
options: {
|
||||
plugins: () => [autoprefixer({
|
||||
browsers: ['> 1%', 'not ie 11'],
|
||||
})],
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
},
|
||||
}, {
|
||||
loader: 'sass-loader',
|
||||
}],
|
||||
{
|
||||
loader: 'css-loader',
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
ident: 'postcss',
|
||||
options: {
|
||||
plugins: () => [
|
||||
autoprefixer({
|
||||
browsers: ['> 1%', 'not ie 11'],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)$/,
|
||||
|
@ -53,13 +58,15 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'assets/fonts/',
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'assets/fonts/',
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue