From be21da2e93f05a9d6acd9a1fe1d1c92bbe08c40b Mon Sep 17 00:00:00 2001 From: Tom de Goede Date: Fri, 30 Aug 2019 11:06:32 +0200 Subject: [PATCH] fix: lint errors --- src/core/components/layout-utils.jsx | 2 +- src/core/components/object-model.jsx | 8 ++++---- src/core/containers/filter.jsx | 8 ++++---- src/core/plugins/view/root-injects.jsx | 4 +++- src/plugins/topbar/topbar.jsx | 8 ++++---- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/core/components/layout-utils.jsx b/src/core/components/layout-utils.jsx index 0118395220c..e6a13fcc82b 100644 --- a/src/core/components/layout-utils.jsx +++ b/src/core/components/layout-utils.jsx @@ -74,7 +74,7 @@ export class Col extends React.Component { } if (hide) { - classes.push("hidden"); + classesAr.push("hidden") } let classes = xclass(rest.className, ...classesAr) diff --git a/src/core/components/object-model.jsx b/src/core/components/object-model.jsx index 6ba1ea78add..ee890d114c4 100644 --- a/src/core/components/object-model.jsx +++ b/src/core/components/object-model.jsx @@ -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 ( + return ( { key }{ isRequired && * } diff --git a/src/core/containers/filter.jsx b/src/core/containers/filter.jsx index 7c905bc48e8..24a668cad84 100644 --- a/src/core/containers/filter.jsx +++ b/src/core/containers/filter.jsx @@ -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 (
{filter === null || filter === false ? null :
- diff --git a/src/core/plugins/view/root-injects.jsx b/src/core/plugins/view/root-injects.jsx index ea74b556188..a035e5f0a1e 100644 --- a/src/core/plugins/view/root-injects.jsx +++ b/src/core/plugins/view/root-injects.jsx @@ -76,7 +76,9 @@ const createClass = component => class extends Component { } } -const Fallback = ({ name }) =>
😱 Could not render { name === "t" ? "this component" : name }, see the console.
+const Fallback = ({ + name // eslint-disable-line react/prop-types +}) =>
😱 Could not render { name === "t" ? "this component" : name }, see the console.
const wrapRender = (component) => { const isStateless = component => !(component.prototype && component.prototype.isReactComponent) diff --git a/src/plugins/topbar/topbar.jsx b/src/plugins/topbar/topbar.jsx index 3a08406a278..39df72f6ef9 100644 --- a/src/plugins/topbar/topbar.jsx +++ b/src/plugins/topbar/topbar.jsx @@ -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 = [] @@ -128,7 +128,7 @@ export default class Topbar extends React.Component { } else { formOnSubmit = this.downloadUrl - control.push() + control.push() control.push() }