diff --git a/.eslintrc.js b/.eslintrc.js index aac5995fa..27134414f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -69,6 +69,10 @@ module.exports = { eqeqeq: 'error', indent: ['error', 2], 'jsx-quotes': ['error', 'prefer-single'], + 'key-spacing': [ + 'error', + { mode: 'minimum' }, + ], 'no-catch-shadow': 'error', 'no-cond-assign': 'error', 'no-console': [ @@ -111,6 +115,13 @@ module.exports = { 'prefer-const': 'error', quotes: ['error', 'single'], semi: 'error', + 'space-unary-ops': [ + 'error', + { + words: true, + nonwords: false, + }, + ], strict: 'off', 'valid-typeof': 'error', diff --git a/app/soapbox/actions/lists.js b/app/soapbox/actions/lists.js index 68171cbe3..a04bbc6f1 100644 --- a/app/soapbox/actions/lists.js +++ b/app/soapbox/actions/lists.js @@ -367,7 +367,7 @@ export const fetchAccountLists = accountId => (dispatch, getState) => { }; export const fetchAccountListsRequest = id => ({ - type:LIST_ADDER_LISTS_FETCH_REQUEST, + type: LIST_ADDER_LISTS_FETCH_REQUEST, id, }); diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index 949b3801f..5334c9784 100644 --- a/app/soapbox/features/account/components/header.js +++ b/app/soapbox/features/account/components/header.js @@ -235,7 +235,7 @@ class Header extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.props.onDirect, - icon:require('@tabler/icons/icons/mail.svg'), + icon: require('@tabler/icons/icons/mail.svg'), }); } diff --git a/app/soapbox/features/conversations/components/conversation.js b/app/soapbox/features/conversations/components/conversation.js index a543a6f21..7589f725c 100644 --- a/app/soapbox/features/conversations/components/conversation.js +++ b/app/soapbox/features/conversations/components/conversation.js @@ -14,7 +14,7 @@ export default class Conversation extends ImmutablePureComponent { conversationId: PropTypes.string.isRequired, accounts: ImmutablePropTypes.list.isRequired, lastStatusId: PropTypes.string, - unread:PropTypes.bool.isRequired, + unread: PropTypes.bool.isRequired, onMoveUp: PropTypes.func, onMoveDown: PropTypes.func, markRead: PropTypes.func.isRequired, diff --git a/app/soapbox/features/ui/components/accordion.js b/app/soapbox/features/ui/components/accordion.js index 2697ee558..579871481 100644 --- a/app/soapbox/features/ui/components/accordion.js +++ b/app/soapbox/features/ui/components/accordion.js @@ -34,7 +34,7 @@ export default @injectIntl class Accordion extends React.PureComponent { const { headline, children, menu, expanded, intl } = this.props; return ( -