diff --git a/.eslintrc.yml b/.eslintrc.yml index 2176618..049d4ec 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -64,9 +64,24 @@ rules: strict: off valid-typeof: error + react/jsx-boolean-value: error + react/jsx-closing-bracket-location: + - error + - line-aligned + react/jsx-curly-spacing: error + react/jsx-equals-spacing: error + react/jsx-first-prop-new-line: + - error + - multiline-multiprop + react/jsx-indent: + - error + - 2 react/jsx-no-bind: error + react/jsx-no-duplicate-props: error + react/jsx-tag-spacing: error react/jsx-wrap-multilines: error react/no-multi-comp: off + react/no-string-refs: error react/prop-types: error react/self-closing-comp: error diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index 9d65af4..960d136 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -55,11 +55,11 @@ class Account extends ImmutablePureComponent { const muting = account.getIn(['relationship', 'muting']); if (requested) { - buttons = ; + buttons = ; } else if (blocking) { - buttons = ; + buttons = ; } else if (muting) { - buttons = ; + buttons = ; } else { buttons = ; } diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js index 10efd17..5bfc200 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.js +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -191,7 +191,8 @@ class AutosuggestTextarea extends ImmutablePureComponent { key={suggestion} data-index={suggestion} className={`autosuggest-textarea__suggestions__item ${i === selectedSuggestion ? 'selected' : ''}`} - onClick={this.onSuggestionClick}> + onClick={this.onSuggestionClick} + > ))} diff --git a/app/javascript/mastodon/components/column_back_button.js b/app/javascript/mastodon/components/column_back_button.js index 6c61ca6..3add659 100644 --- a/app/javascript/mastodon/components/column_back_button.js +++ b/app/javascript/mastodon/components/column_back_button.js @@ -16,7 +16,7 @@ class ColumnBackButton extends React.PureComponent { render () { return (
- +
); diff --git a/app/javascript/mastodon/components/dropdown_menu.js b/app/javascript/mastodon/components/dropdown_menu.js index e637c5f..5712cff 100644 --- a/app/javascript/mastodon/components/dropdown_menu.js +++ b/app/javascript/mastodon/components/dropdown_menu.js @@ -53,13 +53,13 @@ class DropdownMenu extends React.PureComponent { renderItem = (item, i) => { if (item === null) { - return
  • ; + return
  • ; } const { text, action, href = '#' } = item; return ( -
  • +
  • {text} @@ -81,7 +81,7 @@ class DropdownMenu extends React.PureComponent { return ( - + diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index c8df589..302e63d 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -76,7 +76,8 @@ class IconButton extends React.PureComponent { title={this.props.title} className={classes.join(' ')} onClick={this.handleClick} - style={style}> + style={style} + >