Skip to content

Commit

Permalink
[Fixed] lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh3341 committed Mar 23, 2023
1 parent 897618e commit 27a3701
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plugins/gatsby-source-jenkinsplugins/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ const fetchPluginVersions = async ({createNode, reporter, firstReleases}) => {
};

const fetchPluginHealthScore = async ({createNode, reporter}) => {
const sectionActivity = reporter.activityTimer(`fetch plugin health score`);
const sectionActivity = reporter.activityTimer('fetch plugin health score');
sectionActivity.start();
const url = 'https://plugin-health.jenkins.io/api/scores';
const json = await requestGET({url, reporter});
Expand Down
10 changes: 5 additions & 5 deletions plugins/plugin-site/src/components/Plugin.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
import {navigate} from 'gatsby';
import {navigate, useStaticQuery, graphql} from 'gatsby';
import {cleanTitle} from '../commons/helper';
import Icon from '../components/Icon';
import PluginLabels from '../components/PluginLabels';
import PluginLastReleased from '../components/PluginLastReleased';
import PluginDevelopers from '../components/PluginDevelopers';
import PluginHealthScore from '../components/PluginHealthScore';
import { useStaticQuery, graphql } from "gatsby";


function Developers({developers}) {
return (
Expand All @@ -27,7 +27,7 @@ Developers.propTypes = PluginDevelopers.propTypes;
function Plugin({plugin: {name, title, stats, labels, excerpt, developers, buildDate, releaseTimestamp}}) {
let progress = 0;
let color =
progress > 80 ? "#87d068" : progress > 60 ? "#e5e512" : "#fe3535";
progress > 80 ? '#87d068' : progress > 60 ? '#e5e512' : '#fe3535';

const graphqlData = useStaticQuery(graphql`
query {
Expand All @@ -42,14 +42,14 @@ function Plugin({plugin: {name, title, stats, labels, excerpt, developers, build
}
`);

let health = graphqlData.allJenkinsPluginHealthScore.edges.find(
const health = graphqlData.allJenkinsPluginHealthScore.edges.find(
(edge) => edge.node.id === name
);

if (health) {
progress = health.node.value;
color =
progress > 80 ? "#87d068" : progress > 60 ? "#e5e512" : "#fe3535";
progress > 80 ? '#87d068' : progress > 60 ? '#e5e512' : '#fe3535';
}

return (
Expand Down
10 changes: 5 additions & 5 deletions plugins/plugin-site/src/components/PluginHealthScore.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Progress } from 'antd';
import {Progress} from 'antd';

function PluginHealthScore({healthScore,color}) {
function PluginHealthScore({healthScore, color}) {
return (
<>
<h6>Health Score</h6>
<Progress percent={healthScore} strokeColor={color} />
<h6>Health Score</h6>
<Progress percent={healthScore} strokeColor={color} />
</>
);
}
Expand All @@ -15,4 +15,4 @@ PluginHealthScore.propTypes = {
healthScore: PropTypes.number.isRequired
};

export default PluginHealthScore;
export default PluginHealthScore;

0 comments on commit 27a3701

Please sign in to comment.