Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdegoede committed Aug 30, 2019
1 parent b970016 commit be21da2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/core/components/layout-utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Col extends React.Component {
}

if (hide) {
classes.push("hidden");
classesAr.push("hidden")
}

let classes = xclass(rest.className, ...classesAr)
Expand Down
8 changes: 4 additions & 4 deletions src/core/components/object-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ export default class ObjectModel extends Component {
let isDeprecated = isOAS3() && value.get("deprecated")
let isRequired = List.isList(requiredProperties) && requiredProperties.contains(key)

let classNames = ["property-row"];
let classNames = ["property-row"]

if (isDeprecated) {
classNames.push("deprecated");
classNames.push("deprecated")
}

if (isRequired) {
classNames.push("required");
classNames.push("required")
}

return (<tr key={key} className={classNames.join(' ')}>
return (<tr key={key} className={classNames.join(" ")}>
<td>
{ key }{ isRequired && <span className="star">*</span> }
</td>
Expand Down
8 changes: 4 additions & 4 deletions src/core/containers/filter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export default class FilterContainer extends React.Component {
const isFailed = specSelectors.loadingStatus() === "failed"
const filter = layoutSelectors.currentFilter()

const classNames = ["operation-filter-input"];
if (isFailed) classNames.push("failed");
if (isLoading) classNames.push("loading");
const classNames = ["operation-filter-input"]
if (isFailed) classNames.push("failed")
if (isLoading) classNames.push("loading")

return (
<div>
{filter === null || filter === false ? null :
<div className="filter-container">
<Col className="filter wrapper" mobile={12}>
<input className={classNames.join(' ')} placeholder="Filter by tag" type="text"
<input className={classNames.join(" ")} placeholder="Filter by tag" type="text"
onChange={this.onFilterChange} value={filter === true || filter === "true" ? "" : filter}
disabled={isLoading}/>
</Col>
Expand Down
4 changes: 3 additions & 1 deletion src/core/plugins/view/root-injects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const createClass = component => class extends Component {
}
}

const Fallback = ({ name }) => <div className="fallback">😱 <i>Could not render { name === "t" ? "this component" : name }, see the console.</i></div>
const Fallback = ({
name // eslint-disable-line react/prop-types
}) => <div className="fallback">😱 <i>Could not render { name === "t" ? "this component" : name }, see the console.</i></div>

const wrapRender = (component) => {
const isStateless = component => !(component.prototype && component.prototype.isReactComponent)
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/topbar/topbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ export default class Topbar extends React.Component {
let isLoading = specSelectors.loadingStatus() === "loading"
let isFailed = specSelectors.loadingStatus() === "failed"

const classNames = ["download-url-input"];
if (isFailed) classNames.push("failed");
if (isLoading) classNames.push("loading");
const classNames = ["download-url-input"]
if (isFailed) classNames.push("failed")
if (isLoading) classNames.push("loading")

const { urls } = getConfigs()
let control = []
Expand All @@ -128,7 +128,7 @@ export default class Topbar extends React.Component {
}
else {
formOnSubmit = this.downloadUrl
control.push(<input className={classNames.join(' ')} type="text" onChange={ this.onUrlChange } value={this.state.url} disabled={isLoading} />)
control.push(<input className={classNames.join(" ")} type="text" onChange={ this.onUrlChange } value={this.state.url} disabled={isLoading} />)
control.push(<Button className="download-url-button" onClick={ this.downloadUrl }>Explore</Button>)
}

Expand Down

0 comments on commit be21da2

Please sign in to comment.