Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fix remaining lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
uppal101 committed Sep 8, 2017
1 parent 10942cf commit a064c57
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 423 deletions.
422 changes: 17 additions & 405 deletions lerna-debug.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/api-explorer-ui/src/block-types/api-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ApiHeader = ({ block }) => {
ApiHeader.propTypes = {
block: PropTypes.shape({
data: PropTypes.shape({
type: PropTypes.string.isRequired,
type: PropTypes.string,
title: PropTypes.string.isRequired,
}),
}).isRequired,
Expand Down
2 changes: 1 addition & 1 deletion packages/api-explorer-ui/src/block-types/callout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ CallOut.propTypes = {
data: PropTypes.shape({
type: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
body: PropTypes.array.isRequired,
body: PropTypes.array,
}),
}).isRequired,
};
Expand Down
9 changes: 6 additions & 3 deletions packages/api-explorer-ui/src/block-types/code.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ const BlockCode = ({ data, opts = {} }) => {

return (
<span>
{ opts.label && <hlabel>{opts.label}</hlabel> }

{
// eslint-disable-next-line jsx-a11y/label-has-for
opts.label && <label>{opts.label}</label>
}
<div className="magic-block-code">
{(!opts.hideHeaderOnOne || data.codes.length > 1) && (
<ul className="block-code-header">
Expand All @@ -21,6 +23,7 @@ const BlockCode = ({ data, opts = {} }) => {
<li>
<a href="" onClick={`showCode${i}`} style={`active: ${i === 'tab'} `}>
{
//eslint-disable-next-line
code.status ? (
<span>
<span className={`status-icon status-icon-${statusCodes(code.status)[2]}`} />
Expand All @@ -38,7 +41,7 @@ const BlockCode = ({ data, opts = {} }) => {

<div className="block-code-code">
{
data.codes.map((code, i) => (
data.codes.map(code => (
<pre>
<code>{syntaxHighlighter(code.code, code.language, opts.dark)}</code>
</pre>
Expand Down
10 changes: 5 additions & 5 deletions packages/api-explorer-ui/src/block-types/content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PropTypes = require('prop-types');

const parseBlocks = require('../lib/parse-magic-blocks');

const Loop = ({ content }) => {
const Loop = ({ content, column }) => {
const elements = content.map((block) => {
switch (block.type) {
case 'textarea':
Expand Down Expand Up @@ -84,15 +84,15 @@ const Opts = (props) => {


Loop.propTypes = {
block: PropTypes.shape({
content: PropTypes.arrayOf(PropTypes.shape({
type: PropTypes.string.isRequired,
}).isRequired,
content: PropTypes.shape({}).isRequired,
})).isRequired,
column: PropTypes.string.isRequired,
};

Opts.propTypes = {
'is-three-column': PropTypes.bool.isRequired,
body: PropTypes.shape({}).isRequired,
body: PropTypes.string.isRequired,
};

module.exports = Opts;
4 changes: 2 additions & 2 deletions packages/api-explorer-ui/src/block-types/embed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Embed.propTypes = {
html: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
favicon: PropTypes.string.isRequired,
width: PropTypes.string.isRequired,
height: PropTypes.string.isRequired,
width: PropTypes.string,
height: PropTypes.string,
title: PropTypes.string.isRequired,
}),
}).isRequired,
Expand Down
8 changes: 4 additions & 4 deletions packages/api-explorer-ui/src/block-types/image.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ImageBlock = ({ image }) => {
const border = image.border ? image.border : '';

return (
<div>
<div className="magic-block-image">
{
(image && image.image && image.image.length) && (
<div>
Expand Down Expand Up @@ -49,10 +49,10 @@ ImagesBlock.propTypes = {

ImageBlock.propTypes = {
image: PropTypes.shape({
sizing: PropTypes.string.isRequired,
border: PropTypes.string.isRequired,
sizing: PropTypes.string,
border: PropTypes.string,
image: PropTypes.array.isRequired,
caption: PropTypes.string.isRequired,
caption: PropTypes.string,
}).isRequired,
};

Expand Down
4 changes: 2 additions & 2 deletions packages/api-explorer-ui/src/block-types/parameters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const Parameters = ({ block }) => {
{
(block.data.data['h-0'] || block.data.data['h-1']) && (
<div className="tr">
{Th}
{Th()}
</div>
)
}
{Tr}
{Tr()}

</div>
</div>
Expand Down

0 comments on commit a064c57

Please sign in to comment.