Improve eslint rules (#3147)
* Add semi to ESLint rules * Add padded-blocks to ESLint rules * Add comma-dangle to ESLint rules * add config/webpack and storyboard * add streaming/ * yarn test:lint -- --fix
This commit is contained in:
committed by
Eugen Rochko
parent
812fe90eca
commit
2e112e2406
@ -2,7 +2,7 @@ import { connect } from 'react-redux';
|
||||
import LoadingBar from 'react-redux-loading-bar';
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
loading: state.get('loadingBar')
|
||||
loading: state.get('loadingBar'),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
|
||||
|
@ -4,7 +4,7 @@ import ModalRoot from '../components/modal_root';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
type: state.get('modal').modalType,
|
||||
props: state.get('modal').modalProps
|
||||
props: state.get('modal').modalProps,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
@ -2,19 +2,19 @@ import { connect } from 'react-redux';
|
||||
import { NotificationStack } from 'react-notification';
|
||||
import {
|
||||
dismissAlert,
|
||||
clearAlerts
|
||||
clearAlerts,
|
||||
} from '../../../actions/alerts';
|
||||
import { getAlerts } from '../../../selectors';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
notifications: getAlerts(state)
|
||||
notifications: getAlerts(state),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
onDismiss: alert => {
|
||||
dispatch(dismissAlert(alert));
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@ const makeGetStatusIds = () => createSelector([
|
||||
(state, { type }) => state.getIn(['settings', type], Immutable.Map()),
|
||||
(state, { type }) => state.getIn(['timelines', type, 'items'], Immutable.List()),
|
||||
(state) => state.get('statuses'),
|
||||
(state) => state.getIn(['meta', 'me'])
|
||||
(state) => state.getIn(['meta', 'me']),
|
||||
], (columnSettings, statusIds, statuses, me) => statusIds.filter(id => {
|
||||
const statusForId = statuses.get(id);
|
||||
let showStatus = true;
|
||||
@ -45,7 +45,7 @@ const makeMapStateToProps = () => {
|
||||
statusIds: getStatusIds(state, props),
|
||||
isLoading: state.getIn(['timelines', props.type, 'isLoading'], true),
|
||||
isUnread: state.getIn(['timelines', props.type, 'unread']) > 0,
|
||||
hasMore: !!state.getIn(['timelines', props.type, 'next'])
|
||||
hasMore: !!state.getIn(['timelines', props.type, 'next']),
|
||||
});
|
||||
|
||||
return mapStateToProps;
|
||||
@ -64,7 +64,7 @@ const mapDispatchToProps = (dispatch, { type, id }) => ({
|
||||
|
||||
onScroll: debounce(() => {
|
||||
dispatch(scrollTopTimeline(type, false));
|
||||
}, 100)
|
||||
}, 100),
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user