Skip to content

Commit

Permalink
refactor(feed): ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Jul 31, 2018
1 parent 1f18629 commit b3d2125
Show file tree
Hide file tree
Showing 13 changed files with 572 additions and 600 deletions.
39 changes: 39 additions & 0 deletions packages/slimkit-plus-feed/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2016,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
};
36 changes: 18 additions & 18 deletions packages/slimkit-plus-feed/admin/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React, { Component } from 'react';
import PropTypes from 'prop-types'
import PropTypes from 'prop-types';
import { matchPath, withRouter } from 'react-router';
import { Route } from 'react-router-dom';
import withStyles from '@material-ui/core/styles/withStyles';
Expand Down Expand Up @@ -85,30 +85,30 @@ class App extends Component
const { history: { replace } } = this.props;
this.setState({ value });
switch (value) {
case 'comments':
replace('/comments');
break;
case 'comments':
replace('/comments');
break;

case 'feeds':
replace('/feeds');
break;
case 'feeds':
replace('/feeds');
break;

case 'paycontrol':
replace('/paycontrol');
break;
case 'paycontrol':
replace('/paycontrol');
break;

// case 'deleteComments':
// replace('/deleteComments');
// break;

case 'deleteFeeds':
replace('/deleteFeeds');
break;
case 'deleteFeeds':
replace('/deleteFeeds');
break;

case 'root':
default:
replace('/');
break;
case 'root':
default:
replace('/');
break;
}
};

Expand All @@ -122,7 +122,7 @@ class App extends Component
const { classes } = this.props;
return (
<div className={classes.root}>
<AppBar position="fixed">
<AppBar position="static">
<Toolbar>
<Tabs
value={this.matchPath()}
Expand Down
Loading

0 comments on commit b3d2125

Please sign in to comment.