From fba0da4c58b569ae9cb9dc8a7622b492b1fcc4c2 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 7 Aug 2019 16:16:57 -0400 Subject: [PATCH] Fix linting --- awx/ui_next/src/components/Sparkline/JobStatusIcon.jsx | 7 +++++-- awx/ui_next/src/components/Sparkline/Sparkline.jsx | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/Sparkline/JobStatusIcon.jsx b/awx/ui_next/src/components/Sparkline/JobStatusIcon.jsx index ce6713e90d..3a1360a6dd 100644 --- a/awx/ui_next/src/components/Sparkline/JobStatusIcon.jsx +++ b/awx/ui_next/src/components/Sparkline/JobStatusIcon.jsx @@ -1,5 +1,5 @@ import React, { Fragment } from 'react'; -import { node, object, string } from 'prop-types'; +import { node, number, shape, string } from 'prop-types'; import { Link } from 'react-router-dom'; import styled, { keyframes } from 'styled-components'; import { Tooltip } from '@patternfly/react-core'; @@ -100,7 +100,10 @@ const JobStatusIcon = ({ job, link, tooltip, ...props }) => { }; JobStatusIcon.propTypes = { - job: object.isRequired, + job: shape({ + id: number.isRequired, + status: string.isRequired, + }).isRequired, link: string, tooltip: node, }; diff --git a/awx/ui_next/src/components/Sparkline/Sparkline.jsx b/awx/ui_next/src/components/Sparkline/Sparkline.jsx index 7883dbc4e4..0456b4eaa7 100644 --- a/awx/ui_next/src/components/Sparkline/Sparkline.jsx +++ b/awx/ui_next/src/components/Sparkline/Sparkline.jsx @@ -6,9 +6,11 @@ import styled from 'styled-components'; import { t } from '@lingui/macro'; import { JOB_TYPE_URL_SEGMENTS } from '../../constants'; +/* eslint-disable react/jsx-pascal-case */ const JobStatusIcon = styled(props => <_JobStatusIcon {...props} />)` margin-right: 5px; `; +/* eslint-enable react/jsx-pascal-case */ const Sparkline = ({ i18n, jobs }) => { const generateTooltip = job => (