Skip to content

Commit

Permalink
disable prettier in codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
bdittes committed Feb 3, 2020
1 parent eb2fd59 commit 5d945be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ plugins:
channel: "eslint-5"
config:
config: .eslintrc
checks:
prettier/prettier:
enabled: false
ratings:
paths:
- app/**
Expand Down
16 changes: 4 additions & 12 deletions app/react/Review/components/OneUpEntityButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,29 @@ export class OneUpEntityButtonsBase extends Component<OneUpEntityButtonsProps> {

render() {
const { isPristine } = this.props;

const btnClass = isPristine ? 'btn btn-default btn-disabled' : 'btn btn-default';
return (
<div className="content-footer">
<button
type="button"
onClick={() => this.props.switchOneUpEntity(0, false)}
className={
!isPristine
? 'cancel-edit-metadata btn btn-default btn-danger'
: 'btn btn-default btn-disabled'
}
className={`cancel-edit-metadata btn-danger ${btnClass}`}
>
<Icon icon="undo" />
<span className="btn-label">{t('System', 'Discard changes')}</span>
</button>
<button
type="button"
onClick={() => this.props.switchOneUpEntity(0, true)}
className={!isPristine ? 'save-metadata btn btn-default' : 'btn btn-default btn-disabled'}
className={`save-metadata ${btnClass}`}
>
<Icon icon="save" />
<span className="btn-label">{t('System', 'Save document')}</span>
</button>
<button
type="button"
onClick={() => this.props.switchOneUpEntity(+1, true)}
className={
!isPristine
? 'save-and-next btn btn-default btn-success'
: 'btn btn-default btn-disabled'
}
className={`save-and-next btn-success ${btnClass}`}
>
<Icon icon="save" />
<span className="btn-label">{t('System', 'Save and go to next')}</span>
Expand Down

0 comments on commit 5d945be

Please sign in to comment.