From 8bd223bf5f88b372c36322761dcf3ef8b15aa31f Mon Sep 17 00:00:00 2001 From: Gang Li Date: Mon, 13 Nov 2023 16:53:47 +0800 Subject: [PATCH] Update lint rules: disable max-line limit --- src/main/webui/.eslintrc.json | 2 +- src/main/webui/src/app/components/Filters.js | 5 +++-- src/main/webui/src/app/components/content/Hints.jsx | 1 - src/main/webui/src/app/components/content/RemoteList.jsx | 1 - src/main/webui/src/app/components/content/RemoteView.jsx | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/webui/.eslintrc.json b/src/main/webui/.eslintrc.json index e482f71..8594b1c 100644 --- a/src/main/webui/.eslintrc.json +++ b/src/main/webui/.eslintrc.json @@ -114,7 +114,7 @@ "max-classes-per-file": 2, "max-depth": 2, "max-len": 0, - "max-lines": 1, + "max-lines": 0, "max-lines-per-function": 0, "max-nested-callbacks": 2, "max-params": 0, diff --git a/src/main/webui/src/app/components/Filters.js b/src/main/webui/src/app/components/Filters.js index 607ef93..9b4a118 100644 --- a/src/main/webui/src/app/components/Filters.js +++ b/src/main/webui/src/app/components/Filters.js @@ -15,7 +15,8 @@ */ export const Filters = { - checkmark(input){ - return input ? '\u2713' : '\u2718'; + // Return the checkmark icon based on input + checkmark(isChecked){ + return isChecked ? '\u2713' : '\u2718'; } }; diff --git a/src/main/webui/src/app/components/content/Hints.jsx b/src/main/webui/src/app/components/content/Hints.jsx index 4be887f..f479fef 100644 --- a/src/main/webui/src/app/components/content/Hints.jsx +++ b/src/main/webui/src/app/components/content/Hints.jsx @@ -48,7 +48,6 @@ const PasswordMask = ()=> ********; // timer(..., 0) // }] // Not sure what this timeout is doing, will check it later - const DisableTimeoutHint = ({children}) =>{ let suggestion = children ? children: 'Integer time in seconds which is used for repo automatically re-enable when set disable by errors,' + diff --git a/src/main/webui/src/app/components/content/RemoteList.jsx b/src/main/webui/src/app/components/content/RemoteList.jsx index 96c8efc..5f14b1e 100644 --- a/src/main/webui/src/app/components/content/RemoteList.jsx +++ b/src/main/webui/src/app/components/content/RemoteList.jsx @@ -21,7 +21,6 @@ import {remoteOptionLegend as options} from "../ComponentConstants.js"; import {Utils} from '../CompUtils.js'; import {StoreListingWidget} from './CommonPageWidget.jsx'; import {jsonRest} from '../../RestClient.js'; -import {DisableTimeoutHint} from './Hints.jsx'; const init = (state, setState) => { useEffect(()=>{ diff --git a/src/main/webui/src/app/components/content/RemoteView.jsx b/src/main/webui/src/app/components/content/RemoteView.jsx index be520b1..a39272b 100644 --- a/src/main/webui/src/app/components/content/RemoteView.jsx +++ b/src/main/webui/src/app/components/content/RemoteView.jsx @@ -14,7 +14,6 @@ * limitations under the License. */ -/* eslint-disable max-lines */ import React, {useState, useEffect} from 'react'; import {useParams} from 'react-router-dom'; import {PropTypes} from 'prop-types';