chore: fix miscellaneous errors from linters (#1555)

This commit is contained in:
Caleb
2018-07-31 15:03:46 -06:00
committed by Shawn Erquhart
parent d5f59de2d2
commit 5a27fb8b9d
35 changed files with 75 additions and 85 deletions

View File

@ -112,4 +112,4 @@ export default class Shortcode extends React.Component {
</ShortcodeContainer>
);
}
};
}

View File

@ -14,7 +14,7 @@ const testPlugins = fromJS([
alt: match[1],
},
toBlock: data => `![${ data.alt }](${ data.image })`,
toPreview: data => <img src={data.image} alt={data.alt} />,
toPreview: data => <img src={data.image} alt={data.alt} />, // eslint-disable-line react/display-name
pattern: /^!\[([^\]]+)]\(([^)]+)\)$/,
fields: [{
label: 'Image',

View File

@ -51,4 +51,4 @@ function onKeyDown(event, change) {
event.preventDefault();
return change.toggleMark(markName);
}
};
}

View File

@ -86,4 +86,4 @@ export function validateNode(node) {
);
}
}
};
}

View File

@ -70,6 +70,13 @@ export default css`
white-space: pre-wrap;
}
code {
background-color: ${colors.background};
border-radius: ${lengths.borderRadius};
padding: 0 2px;
font-size: 85%;
}
pre > code {
display: block;
width: 100%;
@ -80,13 +87,6 @@ export default css`
padding: 10px;
}
code {
background-color: ${colors.background};
border-radius: ${lengths.borderRadius};
padding: 0 2px;
font-size: 85%;
}
blockquote {
padding-left: 16px;
border-left: 3px solid ${colors.background};

View File

@ -1,5 +1,3 @@
/* eslint max-len:0 */
import React from 'react';
import renderer from 'react-test-renderer';
import { padStart } from 'lodash';

View File

@ -106,7 +106,7 @@ export const remarkToMarkdown = obj => {
const Compiler = this.Compiler;
const visitors = Compiler.prototype.visitors;
visitors.text = node => node.value;
};
}
/**
* Provide an empty MDAST if no value is provided.

View File

@ -56,4 +56,4 @@ export default function remarkAllowHtmlEntities() {
value: subvalue,
});
}
};
}

View File

@ -93,7 +93,7 @@ const escapePatterns = [
*
* Match strings surrounded by one or more asterisks on both sides.
*/
/(\*+)[^\*]*(\1)/g,
/(\*+)[^*]*(\1)/g,
/**
* Emphasis - Underscore

View File

@ -48,7 +48,7 @@ export default function remarkPaddedLinks() {
const children = processedChildren.map(transform);
return { ...node, children };
};
}
function transformChildren(node) {
if (node.type !== 'link') return node;
@ -102,7 +102,7 @@ export default function remarkPaddedLinks() {
*/
let findFn;
if (end) { findFn = findLast }
else { findFn = find };
else { findFn = find }
let edgeChildWithValue;
setEdgeChildWithValue(node);

View File

@ -53,4 +53,4 @@ export default function remarkStripTrailingBreaks() {
return node;
};
return transform;
};
}