Fixed ESLint errors and warning that could be fixed with eslint --fix
This commit is contained in:
@ -27,14 +27,14 @@ export default class EntryEditor extends React.Component {
|
||||
calculateHeight() {
|
||||
const height = window.innerHeight - 54;
|
||||
console.log('setting height to %s', height);
|
||||
this.setState({height});
|
||||
this.setState({ height });
|
||||
}
|
||||
|
||||
render() {
|
||||
const { collection, entry, getMedia, onChange, onAddMedia, onRemoveMedia, onPersist } = this.props;
|
||||
const {height} = this.state;
|
||||
const { height } = this.state;
|
||||
|
||||
return <div className={styles.entryEditor} style={{height}}>
|
||||
return <div className={styles.entryEditor} style={{ height }}>
|
||||
<div className={styles.container}>
|
||||
<div className={styles.controlPane}>
|
||||
<ControlPane
|
||||
|
@ -55,7 +55,7 @@ export default class PreviewPane extends React.Component {
|
||||
}
|
||||
|
||||
renderPreview() {
|
||||
const props = Object.assign({}, this.props, {widgetFor: this.widgetFor});
|
||||
const props = Object.assign({}, this.props, { widgetFor: this.widgetFor });
|
||||
const component = registry.getPreviewTemplate(props.collection.get('name')) || Preview;
|
||||
|
||||
render(React.createElement(component, props), this.previewEl);
|
||||
|
@ -6,7 +6,7 @@ const availableIcons = [
|
||||
'bold', 'italic', 'list', 'font', 'text-height', 'text-width', 'align-left', 'align-center', 'align-right',
|
||||
'align-justify', 'indent-left', 'indent-right', 'list-bullet', 'list-numbered', 'strike', 'underline', 'table',
|
||||
'superscript', 'subscript', 'header', 'h1', 'h2', 'paragraph', 'link', 'unlink', 'quote-left', 'quote-right', 'code',
|
||||
'picture','video',
|
||||
'picture', 'video',
|
||||
// Entypo
|
||||
'note', 'note-beamed',
|
||||
'music',
|
||||
@ -199,7 +199,7 @@ const iconPropType = (props, propName) => {
|
||||
|
||||
const noop = function() {};
|
||||
|
||||
export default function Icon({ style, className = '', type, onClick = noop}) {
|
||||
export default function Icon({ style, className = '', type, onClick = noop }) {
|
||||
return <span className={`${styles.root} ${styles[type]} ${className}`} style={style} onClick={onClick} />;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import moment from 'moment';
|
||||
import { Card } from './UI';
|
||||
import { Link } from 'react-router'
|
||||
import { Link } from 'react-router';
|
||||
import { statusDescriptions } from '../constants/publishModes';
|
||||
import styles from './UnpublishedListing.css';
|
||||
|
||||
|
@ -60,7 +60,7 @@ class MarkdownControl extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
|
||||
{ this.renderEditor() }
|
||||
{this.renderEditor()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -62,4 +62,4 @@ export const SCHEMA = {
|
||||
borderRadius: '4px'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ function processEditorPlugins(plugins) {
|
||||
<div {...props.attributes} className={className}>
|
||||
<div className="plugin_icon" contentEditable={false}><Icon type={plugin.icon}/></div>
|
||||
<div className="plugin_fields" contentEditable={false}>
|
||||
{ plugin.fields.map(field => `${field.label}: “${node.data.get(field.name)}”`) }
|
||||
{plugin.fields.map(field => `${field.label}: “${node.data.get(field.name)}”`)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -39,4 +39,4 @@ storiesOf('Card', module)
|
||||
<p>header and footer elements are also not subject to margin</p>
|
||||
<footer style={styles.footer}>© Thousand Cats Corp</footer>
|
||||
</Card>
|
||||
))
|
||||
));
|
||||
|
Reference in New Issue
Block a user