replaced eslint:recommended with prettier

This commit is contained in:
Wyatt Johnson
2018-01-11 20:00:34 -07:00
parent d56c19016a
commit 0abc2ca243
649 changed files with 16235 additions and 13008 deletions
@@ -1,58 +1,62 @@
import React from 'react';
import cn from 'classnames';
import styles from './ModActionButton.css';
import {pluginName} from '../../package.json';
import {t} from 'plugin-api/beta/client/services';
import {Icon} from 'plugin-api/beta/client/components/ui';
import { pluginName } from '../../package.json';
import { t } from 'plugin-api/beta/client/services';
import { Icon } from 'plugin-api/beta/client/components/ui';
export class ModActionButton extends React.Component {
constructor() {
super();
this.state = {
on: false
on: false,
};
}
handleMouseEnter = (e) => {
handleMouseEnter = e => {
e.preventDefault();
this.setState({
on: true
on: true,
});
}
};
handleMouseLeave = (e) => {
handleMouseLeave = e => {
e.preventDefault();
this.setState({
on: false
on: false,
});
}
};
handleDeleteTag = () => {
this.props.deleteTag();
this.props.closeMenu();
}
};
handlePostTag = () => {
this.props.postTag();
this.props.closeMenu();
}
};
render() {
const {alreadyTagged} = this.props;
const {handleDeleteTag, handlePostTag} = this;
const { alreadyTagged } = this.props;
const { handleDeleteTag, handlePostTag } = this;
return (
<button className={cn(`${pluginName}-tag-button`, styles.button, {[styles.featured] : alreadyTagged})}
<button
className={cn(`${pluginName}-tag-button`, styles.button, {
[styles.featured]: alreadyTagged,
})}
onClick={alreadyTagged ? handleDeleteTag : handlePostTag}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave} >
onMouseLeave={this.handleMouseLeave}
>
{alreadyTagged ? (
<span className={styles.approved}>
<Icon name="star" className={styles.icon} />
{!this.state.on ? t('talk-plugin-featured-comments.featured') : t('talk-plugin-featured-comments.un_feature')}
{!this.state.on
? t('talk-plugin-featured-comments.featured')
: t('talk-plugin-featured-comments.un_feature')}
</span>
) : (
<span>
@@ -60,11 +64,9 @@ export class ModActionButton extends React.Component {
{t('talk-plugin-featured-comments.feature')}
</span>
)}
</button>
);
}
}
export default ModActionButton;