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:
		
					parent
					
						
							
								812fe90eca
							
						
					
				
			
			
				commit
				
					
						2e112e2406
					
				
			
		
					 170 changed files with 919 additions and 904 deletions
				
			
		|  | @ -15,7 +15,7 @@ const makeMapStateToProps = () => { | |||
| 
 | ||||
|   const mapStateToProps = (state, props) => ({ | ||||
|     account: getAccount(state, props.id), | ||||
|     me: state.getIn(['meta', 'me']) | ||||
|     me: state.getIn(['meta', 'me']), | ||||
|   }); | ||||
| 
 | ||||
|   return mapStateToProps; | ||||
|  | @ -44,7 +44,7 @@ const mapDispatchToProps = (dispatch) => ({ | |||
|     } else { | ||||
|       dispatch(muteAccount(account.get('id'))); | ||||
|     } | ||||
|   } | ||||
|   }, | ||||
| }); | ||||
| 
 | ||||
| export default connect(makeMapStateToProps, mapDispatchToProps)(Account); | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ import { | |||
|   deleteFromTimelines, | ||||
|   refreshTimeline, | ||||
|   connectTimeline, | ||||
|   disconnectTimeline | ||||
|   disconnectTimeline, | ||||
| } from '../actions/timelines'; | ||||
| import { showOnboardingOnce } from '../actions/onboarding'; | ||||
| import { updateNotifications, refreshNotifications } from '../actions/notifications'; | ||||
|  | @ -75,7 +75,7 @@ const initialState = JSON.parse(document.getElementById("initial-state").textCon | |||
| store.dispatch(hydrateStore(initialState)); | ||||
| 
 | ||||
| const browserHistory = useRouterHistory(createBrowserHistory)({ | ||||
|   basename: '/web' | ||||
|   basename: '/web', | ||||
| }); | ||||
| 
 | ||||
| addLocaleData([ | ||||
|  | @ -155,7 +155,7 @@ class Mastodon extends React.PureComponent { | |||
|         store.dispatch(connectTimeline('home')); | ||||
|         store.dispatch(refreshTimeline('home')); | ||||
|         store.dispatch(refreshNotifications()); | ||||
|       } | ||||
|       }, | ||||
| 
 | ||||
|     }); | ||||
| 
 | ||||
|  | @ -223,7 +223,7 @@ class Mastodon extends React.PureComponent { | |||
| } | ||||
| 
 | ||||
| Mastodon.propTypes = { | ||||
|   locale: PropTypes.string.isRequired | ||||
|   locale: PropTypes.string.isRequired, | ||||
| }; | ||||
| 
 | ||||
| export default Mastodon; | ||||
|  |  | |||
|  | @ -4,23 +4,23 @@ import Status from '../components/status'; | |||
| import { makeGetStatus } from '../selectors'; | ||||
| import { | ||||
|   replyCompose, | ||||
|   mentionCompose | ||||
|   mentionCompose, | ||||
| } from '../actions/compose'; | ||||
| import { | ||||
|   reblog, | ||||
|   favourite, | ||||
|   unreblog, | ||||
|   unfavourite | ||||
|   unfavourite, | ||||
| } from '../actions/interactions'; | ||||
| import { | ||||
|   blockAccount, | ||||
|   muteAccount | ||||
|   muteAccount, | ||||
| } from '../actions/accounts'; | ||||
| import { muteStatus, unmuteStatus, deleteStatus } from '../actions/statuses'; | ||||
| import { initReport } from '../actions/reports'; | ||||
| import { openModal } from '../actions/modal'; | ||||
| import { createSelector } from 'reselect' | ||||
| import { isMobile } from '../is_mobile' | ||||
| import { createSelector } from 'reselect'; | ||||
| import { isMobile } from '../is_mobile'; | ||||
| import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; | ||||
| 
 | ||||
| const messages = defineMessages({ | ||||
|  | @ -37,7 +37,7 @@ const makeMapStateToProps = () => { | |||
|     status: getStatus(state, props.id), | ||||
|     me: state.getIn(['meta', 'me']), | ||||
|     boostModal: state.getIn(['meta', 'boost_modal']), | ||||
|     autoPlayGif: state.getIn(['meta', 'auto_play_gif']) | ||||
|     autoPlayGif: state.getIn(['meta', 'auto_play_gif']), | ||||
|   }); | ||||
| 
 | ||||
|   return mapStateToProps; | ||||
|  | @ -77,7 +77,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ | |||
|     dispatch(openModal('CONFIRM', { | ||||
|       message: intl.formatMessage(messages.deleteMessage), | ||||
|       confirm: intl.formatMessage(messages.deleteConfirm), | ||||
|       onConfirm: () => dispatch(deleteStatus(status.get('id'))) | ||||
|       onConfirm: () => dispatch(deleteStatus(status.get('id'))), | ||||
|     })); | ||||
|   }, | ||||
| 
 | ||||
|  | @ -97,7 +97,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ | |||
|     dispatch(openModal('CONFIRM', { | ||||
|       message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong>@{account.get('acct')}</strong> }} />, | ||||
|       confirm: intl.formatMessage(messages.blockConfirm), | ||||
|       onConfirm: () => dispatch(blockAccount(account.get('id'))) | ||||
|       onConfirm: () => dispatch(blockAccount(account.get('id'))), | ||||
|     })); | ||||
|   }, | ||||
| 
 | ||||
|  | @ -109,7 +109,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ | |||
|     dispatch(openModal('CONFIRM', { | ||||
|       message: <FormattedMessage id='confirmations.mute.message' defaultMessage='Are you sure you want to mute {name}?' values={{ name: <strong>@{account.get('acct')}</strong> }} />, | ||||
|       confirm: intl.formatMessage(messages.muteConfirm), | ||||
|       onConfirm: () => dispatch(muteAccount(account.get('id'))) | ||||
|       onConfirm: () => dispatch(muteAccount(account.get('id'))), | ||||
|     })); | ||||
|   }, | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue