diff --git a/sippy-ng/eslint.config.mjs b/sippy-ng/eslint.config.mjs index 21c5a18ba..1d3ff29b6 100644 --- a/sippy-ng/eslint.config.mjs +++ b/sippy-ng/eslint.config.mjs @@ -46,8 +46,12 @@ export default [ }, rules: { 'no-unused-vars': [ - 'warn', - { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, ], 'react/display-name': 'off', 'react/jsx-uses-react': 'warn', diff --git a/sippy-ng/src/App.jsx b/sippy-ng/src/App.jsx index 8a6dbebe2..07d29852b 100644 --- a/sippy-ng/src/App.jsx +++ b/sippy-ng/src/App.jsx @@ -399,7 +399,7 @@ const ChatInterfaceWrapper = () => { return } -function App(props) { +function App(_props) { const classes = useStyles() const theme = useTheme() diff --git a/sippy-ng/src/bugs/BugButton.jsx b/sippy-ng/src/bugs/BugButton.jsx index 3b7f62932..eff503e59 100644 --- a/sippy-ng/src/bugs/BugButton.jsx +++ b/sippy-ng/src/bugs/BugButton.jsx @@ -4,7 +4,7 @@ import { safeEncodeURIComponent } from '../helpers' import PropTypes from 'prop-types' import React, { useState } from 'react' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ alignedButton: { float: 'left', }, @@ -12,7 +12,7 @@ const useStyles = makeStyles((theme) => ({ export default function BugButton(props) { const classes = useStyles() - const [open, setOpen] = useState(false) + const [_open, _setOpen] = useState(false) const text = ` The following test is failing more than expected: diff --git a/sippy-ng/src/bugs/FileBug.jsx b/sippy-ng/src/bugs/FileBug.jsx index f9c62125b..66568ff63 100644 --- a/sippy-ng/src/bugs/FileBug.jsx +++ b/sippy-ng/src/bugs/FileBug.jsx @@ -282,7 +282,7 @@ See the [sippy test details|${url}] for additional context. }) } - const clearAlerts = () => { + const _clearAlerts = () => { setSuccessAlert(null) setErrorAlert('') setIsValidationError(false) diff --git a/sippy-ng/src/build_clusters/BuildClusterHealthChart.jsx b/sippy-ng/src/build_clusters/BuildClusterHealthChart.jsx index 53bcea349..1c59e8993 100644 --- a/sippy-ng/src/build_clusters/BuildClusterHealthChart.jsx +++ b/sippy-ng/src/build_clusters/BuildClusterHealthChart.jsx @@ -42,9 +42,9 @@ export default function BuildClusterHealthChart(props) { return

Loading...

} - let periodCount = 14 + let _periodCount = 14 if (props.period === 'hour') { - periodCount = 24 + _periodCount = 24 } let lastPeriodsSet = new Set() @@ -70,7 +70,7 @@ export default function BuildClusterHealthChart(props) { plugins: { tooltip: { callbacks: { - label: function (context, index) { + label: function (context, _index) { return `${context.dataset.label} ${context.formattedValue}% (${ data[context.dataset.label].by_period[context.label].current_runs } runs)` diff --git a/sippy-ng/src/build_clusters/BuildClusterOverview.jsx b/sippy-ng/src/build_clusters/BuildClusterOverview.jsx index 3fa6c8359..e2bcf2b80 100644 --- a/sippy-ng/src/build_clusters/BuildClusterOverview.jsx +++ b/sippy-ng/src/build_clusters/BuildClusterOverview.jsx @@ -7,7 +7,7 @@ import BuildClusterTable from './BuildClusterTable' import Grid from '@mui/material/Grid' import InfoIcon from '@mui/icons-material/Info' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { flexGrow: 1, }, @@ -21,8 +21,8 @@ const useStyles = makeStyles((theme) => ({ }, })) -export default function BuildClusterOverview(props) { - const classes = useStyles() +export default function BuildClusterOverview(_props) { + const _classes = useStyles() return ( diff --git a/sippy-ng/src/build_clusters/BuildClusterTable.jsx b/sippy-ng/src/build_clusters/BuildClusterTable.jsx index 462545d7b..2422a6b2a 100644 --- a/sippy-ng/src/build_clusters/BuildClusterTable.jsx +++ b/sippy-ng/src/build_clusters/BuildClusterTable.jsx @@ -13,7 +13,7 @@ import PassRateIcon from '../components/PassRateIcon' import PropTypes from 'prop-types' import React, { useEffect } from 'react' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { '& .wrapHeader .MuiDataGrid-columnHeaderTitle': { textOverflow: 'ellipsis', diff --git a/sippy-ng/src/chat/AskSippyButton.jsx b/sippy-ng/src/chat/AskSippyButton.jsx index 88d421e42..cfc3472cb 100644 --- a/sippy-ng/src/chat/AskSippyButton.jsx +++ b/sippy-ng/src/chat/AskSippyButton.jsx @@ -7,7 +7,7 @@ import Alert from '@mui/material/Alert' import PropTypes from 'prop-types' import React, { useContext, useState } from 'react' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ defaultStyledButton: { background: 'linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)', boxShadow: '0 3px 5px 2px rgba(33, 203, 243, .3)', diff --git a/sippy-ng/src/chat/ChatInterface.jsx b/sippy-ng/src/chat/ChatInterface.jsx index 7bc04e396..48881a76b 100644 --- a/sippy-ng/src/chat/ChatInterface.jsx +++ b/sippy-ng/src/chat/ChatInterface.jsx @@ -191,20 +191,28 @@ export default function ChatInterface({ const [isMaximized, setIsMaximized] = useState(false) // Get state and actions from custom hooks - const { sessions, activeSessionId, activeSession } = useSessionState() + const { + sessions: _sessions, + activeSessionId, + activeSession, + } = useSessionState() const { initializeSessions, - createSession, - switchSession, - deleteSession, + createSession: _createSession, + switchSession: _switchSession, + deleteSession: _deleteSession, forkActiveSession, } = useSessionActions() - const { shareLoading, loadingShared } = useShareState() + const { shareLoading: _shareLoading, loadingShared } = useShareState() const { clearSharedUrl, loadSharedConversationFromAPI } = useShareActions() - const { connectionState, isTyping, error, currentThinking } = - useConnectionState() + const { + connectionState, + isTyping: _isTyping, + error, + currentThinking, + } = useConnectionState() const { settings, ensureClientId } = useSettings() // Get messages from active session @@ -220,7 +228,7 @@ export default function ChatInterface({ const { messagesEndRef, messagesListRef, lastMessageRef } = useScrollManagement(activeSessionId, activeSession, messages, settings) - const isConnected = connectionState === CONNECTION_STATES.CONNECTED + const _isConnected = connectionState === CONNECTION_STATES.CONNECTED // Initialize sessions and client ID on mount useEffect(() => { diff --git a/sippy-ng/src/chat/ChatMessage.jsx b/sippy-ng/src/chat/ChatMessage.jsx index 536d2ce53..39ca71184 100644 --- a/sippy-ng/src/chat/ChatMessage.jsx +++ b/sippy-ng/src/chat/ChatMessage.jsx @@ -9,7 +9,7 @@ import { } from '@mui/icons-material' import { formatChatTimestamp, humanize, MESSAGE_TYPES } from './chatUtils' import { Link } from 'react-router-dom' -import { makeStyles, useTheme } from '@mui/styles' +import { makeStyles } from '@mui/styles' import { useModels } from './store/useChatStore' import MessageChart from './MessageChart' import PropTypes from 'prop-types' @@ -19,7 +19,6 @@ import remarkGfm from 'remark-gfm' // Custom link component for ReactMarkdown that opens external links in new tabs const ChatLink = ({ href, children, ...props }) => { - const theme = useTheme() const isExternal = href && (href.startsWith('http://') || href.startsWith('https://')) @@ -284,7 +283,7 @@ const useStyles = makeStyles((theme) => ({ export default function ChatMessage({ message, showTimestamp = true, - showTools = true, + showTools: _showTools = true, }) { const classes = useStyles() const { models } = useModels() diff --git a/sippy-ng/src/chat/MessageChart.jsx b/sippy-ng/src/chat/MessageChart.jsx index 201677458..866df8572 100644 --- a/sippy-ng/src/chat/MessageChart.jsx +++ b/sippy-ng/src/chat/MessageChart.jsx @@ -90,7 +90,7 @@ export default function MessageChart({ visualizations }) { } } - const handleExpandChart = (viz, index) => { + const handleExpandChart = (viz, _index) => { const expandedLayout = { ...viz.layout, paper_bgcolor: theme.palette.background.default, diff --git a/sippy-ng/src/chat/store/personaSlice.jsx b/sippy-ng/src/chat/store/personaSlice.jsx index ed3895508..90a452691 100644 --- a/sippy-ng/src/chat/store/personaSlice.jsx +++ b/sippy-ng/src/chat/store/personaSlice.jsx @@ -1,7 +1,7 @@ /** * Persona slice - manages available chat personas */ -export const createPersonaSlice = (set, get) => ({ +export const createPersonaSlice = (set, _get) => ({ personas: [], personasLoading: false, personasError: null, diff --git a/sippy-ng/src/chat/store/promptsSlice.jsx b/sippy-ng/src/chat/store/promptsSlice.jsx index 63f9270ff..7c4ae6c6d 100644 --- a/sippy-ng/src/chat/store/promptsSlice.jsx +++ b/sippy-ng/src/chat/store/promptsSlice.jsx @@ -1,7 +1,7 @@ /** * Zustand slice for managing slash command prompts */ -export const createPromptsSlice = (set, get) => ({ +export const createPromptsSlice = (set, _get) => ({ // State prompts: [], promptsLoading: false, diff --git a/sippy-ng/src/chat/store/sessionSlice.jsx b/sippy-ng/src/chat/store/sessionSlice.jsx index b2dc86c76..5cc3adf6f 100644 --- a/sippy-ng/src/chat/store/sessionSlice.jsx +++ b/sippy-ng/src/chat/store/sessionSlice.jsx @@ -86,7 +86,7 @@ export const createSessionSlice = (set, get) => ({ setCurrentThinking, setError, setIsTyping, - connectionState, + connectionState: _connectionState, sendMessage, } = get() @@ -319,7 +319,7 @@ export const createSessionSlice = (set, get) => ({ // Message operations - operate on messages within the active session // Add a message to the active session addMessage: (message) => { - const { activeSessionId, sessions } = get() + const { activeSessionId, sessions: _sessions } = get() if (!activeSessionId) { console.warn('Cannot add message: no active session') return diff --git a/sippy-ng/src/chat/store/shareSlice.jsx b/sippy-ng/src/chat/store/shareSlice.jsx index 2fa4bdfa9..61cf98264 100644 --- a/sippy-ng/src/chat/store/shareSlice.jsx +++ b/sippy-ng/src/chat/store/shareSlice.jsx @@ -275,7 +275,7 @@ export const createShareSlice = (set, get) => ({ }, }) }) - .catch((err) => { + .catch((_err) => { set({ shareSnackbar: { open: true, diff --git a/sippy-ng/src/component_readiness/AddRegressionPanel.jsx b/sippy-ng/src/component_readiness/AddRegressionPanel.jsx index 3bf9e9d87..6af8c4a18 100644 --- a/sippy-ng/src/component_readiness/AddRegressionPanel.jsx +++ b/sippy-ng/src/component_readiness/AddRegressionPanel.jsx @@ -9,7 +9,7 @@ import React, { Fragment } from 'react' import RegressionPotentialMatchesTab from './RegressionPotentialMatchesTab' import TriageFields from './TriageFields' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ noMatchesMessage: { textAlign: 'center', padding: '8px', diff --git a/sippy-ng/src/component_readiness/AdvancedOptions.jsx b/sippy-ng/src/component_readiness/AdvancedOptions.jsx index 0882858c9..9c3b533c9 100644 --- a/sippy-ng/src/component_readiness/AdvancedOptions.jsx +++ b/sippy-ng/src/component_readiness/AdvancedOptions.jsx @@ -19,7 +19,7 @@ import Typography from '@mui/material/Typography' export default function AdvancedOptions(props) { const { - headerName, + headerName: _headerName, confidence, pity, minFail, @@ -71,7 +71,7 @@ export default function AdvancedOptions(props) { const handleChangeMinFail = (event, newValue) => { setMinFail(newValue) } - const handleChangePassRateNewTests = (event, newValue) => { + const handleChangePassRateNewTests = (event, _newValue) => { let value = parseInt(event.target.value, 10) if (value < 0) { @@ -81,7 +81,7 @@ export default function AdvancedOptions(props) { } setPassRateNewTests(value) } - const handleChangePassRateAllTests = (event, newValue) => { + const handleChangePassRateAllTests = (event, _newValue) => { let value = parseInt(event.target.value, 10) if (value < 0) { diff --git a/sippy-ng/src/component_readiness/CompCapTestRow.jsx b/sippy-ng/src/component_readiness/CompCapTestRow.jsx index 2c0727b42..c4fb89be3 100644 --- a/sippy-ng/src/component_readiness/CompCapTestRow.jsx +++ b/sippy-ng/src/component_readiness/CompCapTestRow.jsx @@ -12,7 +12,7 @@ import TableRow from '@mui/material/TableRow' export default function CompCapTestRow(props) { const classes = useContext(ComponentReadinessStyleContext) - const { testCols, columnNames } = props + const { testCols, columnNames: _columnNames } = props // Put the testName on the left side with no link. const testNameColumn = ( diff --git a/sippy-ng/src/component_readiness/CompReadyEnvCapabilities.jsx b/sippy-ng/src/component_readiness/CompReadyEnvCapabilities.jsx index 627c182ec..c045ca849 100644 --- a/sippy-ng/src/component_readiness/CompReadyEnvCapabilities.jsx +++ b/sippy-ng/src/component_readiness/CompReadyEnvCapabilities.jsx @@ -35,7 +35,7 @@ import WarningsBanner from './WarningsBanner' // Big query requests take a while so give the user the option to // abort in case they inadvertently requested a huge dataset. let abortController = new AbortController() -const cancelFetch = () => { +const _cancelFetch = () => { console.log('Aborting page2a') abortController.abort() } @@ -225,7 +225,7 @@ export default function CompReadyEnvCapabilities(props) { Name {columnNames - .filter((column, idx) => + .filter((column, _idx) => column.match(new RegExp(escapeRegex(searchColumnRegex), 'i')) ) .map((column, idx) => { @@ -273,7 +273,7 @@ export default function CompReadyEnvCapabilities(props) { key={componentIndex} capabilityName={data.rows[componentIndex].capability} results={data.rows[componentIndex].columns.filter( - (column, idx) => + (column, _idx) => formColumnName(column).match( new RegExp(escapeRegex(searchColumnRegex), 'i') ) diff --git a/sippy-ng/src/component_readiness/CompReadyEnvCapability.jsx b/sippy-ng/src/component_readiness/CompReadyEnvCapability.jsx index c2ac0bbb3..7821b1ade 100644 --- a/sippy-ng/src/component_readiness/CompReadyEnvCapability.jsx +++ b/sippy-ng/src/component_readiness/CompReadyEnvCapability.jsx @@ -35,7 +35,7 @@ import WarningsBanner from './WarningsBanner' // Big query requests take a while so give the user the option to // abort in case they inadvertently requested a huge dataset. let abortController = new AbortController() -const cancelFetch = () => { +const _cancelFetch = () => { console.log('Aborting page3') abortController.abort() } @@ -219,7 +219,7 @@ export default function CompReadyEnvCapability(props) { Name {columnNames - .filter((column, idx) => + .filter((column, _idx) => column.match(new RegExp(escapeRegex(searchColumnRegex), 'i')) ) .map((column, idx) => { @@ -269,7 +269,7 @@ export default function CompReadyEnvCapability(props) { testName={data.rows[componentIndex].test_name} testId={data.rows[componentIndex].test_id} results={data.rows[componentIndex].columns.filter( - (column, idx) => + (column, _idx) => formColumnName(column).match( new RegExp(escapeRegex(searchColumnRegex), 'i') ) diff --git a/sippy-ng/src/component_readiness/CompReadyEnvCapabilityTest.jsx b/sippy-ng/src/component_readiness/CompReadyEnvCapabilityTest.jsx index 965318a1d..457b9e17f 100644 --- a/sippy-ng/src/component_readiness/CompReadyEnvCapabilityTest.jsx +++ b/sippy-ng/src/component_readiness/CompReadyEnvCapabilityTest.jsx @@ -34,7 +34,7 @@ import WarningsBanner from './WarningsBanner' // Big query requests take a while so give the user the option to // abort in case they inadvertently requested a huge dataset. let abortController = new AbortController() -const cancelFetch = () => { +const _cancelFetch = () => { console.log('Aborting page4') abortController.abort() } @@ -58,8 +58,8 @@ export default function CompReadyEnvCapabilityTest(props) { 'searchRow', StringParam ) - const [searchRowRegex, setSearchRowRegex] = useState(searchRowRegexURL) - const handleSearchRowRegexChange = (event) => { + const [_searchRowRegex, setSearchRowRegex] = useState(searchRowRegexURL) + const _handleSearchRowRegexChange = (event) => { const searchValue = event.target.value setSearchRowRegex(searchValue) } @@ -68,9 +68,9 @@ export default function CompReadyEnvCapabilityTest(props) { 'searchColumn', StringParam ) - const [searchColumnRegex, setSearchColumnRegex] = + const [_searchColumnRegex, setSearchColumnRegex] = useState(searchColumnRegexURL) - const handleSearchColumnRegexChange = (event) => { + const _handleSearchColumnRegexChange = (event) => { const searchValue = event.target.value setSearchColumnRegex(searchValue) } @@ -79,12 +79,12 @@ export default function CompReadyEnvCapabilityTest(props) { 'redOnly', BooleanParam ) - const [redOnlyChecked, setRedOnlyChecked] = React.useState(redOnlyURL) - const handleRedOnlyCheckboxChange = (event) => { + const [_redOnlyChecked, setRedOnlyChecked] = React.useState(redOnlyURL) + const _handleRedOnlyCheckboxChange = (event) => { setRedOnlyChecked(event.target.checked) } - const clearSearches = () => { + const _clearSearches = () => { setSearchRowRegex('') if (searchRowRegexURL && searchRowRegexURL !== '') { setSearchRowRegexURL('') diff --git a/sippy-ng/src/component_readiness/CompReadyMainInputs.jsx b/sippy-ng/src/component_readiness/CompReadyMainInputs.jsx index 3538e45a4..ab83dc8e8 100644 --- a/sippy-ng/src/component_readiness/CompReadyMainInputs.jsx +++ b/sippy-ng/src/component_readiness/CompReadyMainInputs.jsx @@ -46,7 +46,7 @@ export default function CompReadyMainInputs({ controlsOpts }) { ]) const varsContext = useContext(CompReadyVarsContext) - const navigate = useNavigate() + const _navigate = useNavigate() const compReadyEnvOptions = (
{ - return (element) => { + return (_element) => { if (searchJobRunIds.has(jobId)) { setSearchJobRunIds(searchJobRunIds.difference(new Set([jobId]))) } else { diff --git a/sippy-ng/src/component_readiness/CompReadyVars.jsx b/sippy-ng/src/component_readiness/CompReadyVars.jsx index 7ae53e52a..3bc2e9643 100644 --- a/sippy-ng/src/component_readiness/CompReadyVars.jsx +++ b/sippy-ng/src/component_readiness/CompReadyVars.jsx @@ -348,7 +348,7 @@ export const CompReadyVarsProvider = ({ children }) => { // This runs when someone pushes the "Generate Report" button. // It sets all parameters based on current state; this causes the URL to be updated and page to load with new params. - const handleGenerateReport = (event, callback) => { + const handleGenerateReport = (event, _callback) => { if (event && event.preventDefault) { event.preventDefault() } @@ -550,7 +550,7 @@ export const CompReadyVarsProvider = ({ children }) => { return retVal } - const cancelFetch = () => { + const _cancelFetch = () => { // This button will do nothing for now and may never need to // since the api call is very quick. console.log('Aborting /variant sippy API call') diff --git a/sippy-ng/src/component_readiness/CompSeverityIcon.jsx b/sippy-ng/src/component_readiness/CompSeverityIcon.jsx index 22ca929a6..3c08368f0 100644 --- a/sippy-ng/src/component_readiness/CompSeverityIcon.jsx +++ b/sippy-ng/src/component_readiness/CompSeverityIcon.jsx @@ -2,13 +2,11 @@ import './ComponentReadiness.css' import { AccessibilityModeContext } from '../components/AccessibilityModeProvider' import { Badge, Tooltip } from '@mui/material' import { getStatusAndIcon } from './CompReadyUtils' -import { useTheme } from '@mui/material/styles' import { withStyles } from '@mui/styles' import PropTypes from 'prop-types' import React, { useContext } from 'react' export default function CompSeverityIcon(props) { - const theme = useTheme() const { accessibilityModeOn } = useContext(AccessibilityModeContext) const { explanations, status, grayFactor, count } = props @@ -23,7 +21,7 @@ export default function CompSeverityIcon(props) { toolTip = explanations.join(' ') } - const StyledBadge = withStyles((theme) => ({ + const StyledBadge = withStyles((_theme) => ({ badge: { height: 12, maxHeight: 12, diff --git a/sippy-ng/src/component_readiness/ComponentReadiness.jsx b/sippy-ng/src/component_readiness/ComponentReadiness.jsx index e59d205f6..05762de5d 100644 --- a/sippy-ng/src/component_readiness/ComponentReadiness.jsx +++ b/sippy-ng/src/component_readiness/ComponentReadiness.jsx @@ -199,11 +199,11 @@ export const TestLifecyclesContext = React.createContext([]) // Big query requests take a while so give the user the option to // abort in case they inadvertently requested a huge dataset. let abortController = new AbortController() -const cancelFetch = () => { +const _cancelFetch = () => { abortController.abort() } -export default function ComponentReadiness(props) { +export default function ComponentReadiness(_props) { const theme = useTheme() const classes = useStyles(theme) @@ -244,7 +244,6 @@ export default function ComponentReadiness(props) { useContext(CompReadyVarsContext) const location = useLocation() - const currentPath = location.pathname const [fetchError, setFetchError] = React.useState('') const [isLoaded, setIsLoaded] = React.useState(false) @@ -254,33 +253,6 @@ export default function ComponentReadiness(props) { const [triageActionTaken, setTriageActionTaken] = React.useState(false) const [componentTab, setComponentTab] = React.useState(0) - const [copyPopoverEl, setCopyPopoverEl] = React.useState(null) - const copyPopoverOpen = Boolean(copyPopoverEl) - - const linkToReport = () => { - const currentUrl = new URL(window.location.href) - if (searchRowRegex && searchRowRegex !== '') { - currentUrl.searchParams.set('searchComponent', searchRowRegex) - } - - if (searchColumnRegex && searchColumnRegex !== '') { - currentUrl.searchParams.set('searchColumn', searchColumnRegex) - } - - if (redOnlyChecked) { - currentUrl.searchParams.set('redOnly', '1') - } - - return currentUrl.href - } - - const copyLinkToReport = (event) => { - event.preventDefault() - navigator.clipboard.writeText(linkToReport()) - setCopyPopoverEl(event.currentTarget) - setTimeout(() => setCopyPopoverEl(null), 2000) - } - const clearSearches = () => { setSearchRowRegex('') if (searchRowRegexURL && searchRowRegexURL !== '') { diff --git a/sippy-ng/src/component_readiness/ComponentReadinessHelp.jsx b/sippy-ng/src/component_readiness/ComponentReadinessHelp.jsx index 81db9b136..0927aede7 100644 --- a/sippy-ng/src/component_readiness/ComponentReadinessHelp.jsx +++ b/sippy-ng/src/component_readiness/ComponentReadinessHelp.jsx @@ -45,13 +45,7 @@ const faqs = [ }, ] -const style = { - bgColor: 'background.paper', - boxShadow: 24, - p: 4, -} - -export default function ComponentReadinessHelp(props) { +export default function ComponentReadinessHelp(_props) { return ( diff --git a/sippy-ng/src/component_readiness/IncludeVariantCheckboxList.jsx b/sippy-ng/src/component_readiness/IncludeVariantCheckboxList.jsx index 7b2f2cf6c..be6cd9000 100644 --- a/sippy-ng/src/component_readiness/IncludeVariantCheckboxList.jsx +++ b/sippy-ng/src/component_readiness/IncludeVariantCheckboxList.jsx @@ -74,7 +74,7 @@ export default function IncludeVariantCheckBoxList(props) { const [isCompareMode, setIsCompareMode] = useState( varsContext.variantCrossCompare.includes(variantGroupName) ) - const handleToggleCompare = (event) => { + const handleToggleCompare = (_event) => { varsContext.updateVariantCrossCompare(variantGroupName, !isCompareMode) setIsCompareMode(!isCompareMode) } diff --git a/sippy-ng/src/component_readiness/JobArtifactQuery.jsx b/sippy-ng/src/component_readiness/JobArtifactQuery.jsx index 0324a3edd..7db144096 100644 --- a/sippy-ng/src/component_readiness/JobArtifactQuery.jsx +++ b/sippy-ng/src/component_readiness/JobArtifactQuery.jsx @@ -171,7 +171,7 @@ export default function JobArtifactQuery(props) { // used to track which runs are selected from the table for further action const [selectedJobRunIds, setSelectedJobRunIds] = React.useState(new Set()) // TODO: enable sorting the table by column headers - const [sortModel, setSortModel] = React.useState([ + const [_sortModel, _setSortModel] = React.useState([ { field: 'job_run_id', sort: 'desc' }, ]) // the search result rows for our table, raw and filtered @@ -196,7 +196,7 @@ export default function JobArtifactQuery(props) { const abortController = new AbortController() // set up the artifact query when parameters are given - const [qParams, url] = constructArtifactQuery() + const [_qParams, url] = constructArtifactQuery() setApiCallURL(url) if (!url) { setRows(emptyRows) @@ -704,7 +704,7 @@ export default function JobArtifactQuery(props) { function JAQOpenArtifactsButton(props) { const { artifacts } = props - function handleOpenLinks(event) { + function handleOpenLinks(_event) { artifacts.forEach((file) => { window.open(file.artifact_url, '_blank') }) diff --git a/sippy-ng/src/component_readiness/NotYetImplemented.jsx b/sippy-ng/src/component_readiness/NotYetImplemented.jsx index f71cfbf54..bb13211e5 100644 --- a/sippy-ng/src/component_readiness/NotYetImplemented.jsx +++ b/sippy-ng/src/component_readiness/NotYetImplemented.jsx @@ -1,10 +1,8 @@ -import { useNavigate } from 'react-router-dom' import PropTypes from 'prop-types' import React from 'react' export default function NotYetImplemented(props) { const { path } = props - const navigate = useNavigate() const goBack = () => { history.goBack() diff --git a/sippy-ng/src/component_readiness/RegressionPotentialMatchesTab.jsx b/sippy-ng/src/component_readiness/RegressionPotentialMatchesTab.jsx index b95225671..fb26faa75 100644 --- a/sippy-ng/src/component_readiness/RegressionPotentialMatchesTab.jsx +++ b/sippy-ng/src/component_readiness/RegressionPotentialMatchesTab.jsx @@ -13,7 +13,6 @@ import { jiraUrlPrefixDeprecated, } from './CompReadyUtils' import { makeStyles } from '@mui/styles' -import { useTheme } from '@mui/material/styles' import PropTypes from 'prop-types' import React, { Fragment, useEffect, useState } from 'react' @@ -46,7 +45,6 @@ export default function RegressionPotentialMatchesTab({ completeTriageSubmission, onMatchesFound, }) { - const theme = useTheme() const classes = useStyles() const [matches, setMatches] = useState([]) const [loadingMatches, setLoadingMatches] = useState(false) diff --git a/sippy-ng/src/component_readiness/TestDetailsReport.jsx b/sippy-ng/src/component_readiness/TestDetailsReport.jsx index 1c2c1934b..ae2fa3095 100644 --- a/sippy-ng/src/component_readiness/TestDetailsReport.jsx +++ b/sippy-ng/src/component_readiness/TestDetailsReport.jsx @@ -54,7 +54,7 @@ import UpsertTriageModal from './UpsertTriageModal' // Big query requests take a while so give the user the option to // abort in case they inadvertently requested a huge dataset. let abortController = new AbortController() -const cancelFetch = () => { +const _cancelFetch = () => { console.log('Aborting page5a') abortController.abort() } @@ -365,11 +365,6 @@ export default function TestDetailsReport(props) { 0, accessibilityModeOn ) - const significanceTitle = `Test results for individual Prow Jobs may not be statistically - significant, but when taken in aggregate, there may be a statistically - significant difference compared to the historical basis - ` - let url if (testDetailsApiCall.startsWith('/')) { // In production mode, there is no hostname so we add it so that 'new URL' will work diff --git a/sippy-ng/src/component_readiness/TriageFields.jsx b/sippy-ng/src/component_readiness/TriageFields.jsx index fbf1eb1ed..d0a239282 100644 --- a/sippy-ng/src/component_readiness/TriageFields.jsx +++ b/sippy-ng/src/component_readiness/TriageFields.jsx @@ -62,7 +62,7 @@ export default function TriageFields({ handleAddToExistingTriage, }) { const classes = useStyles() - const { view, sampleRelease } = useContext(CompReadyVarsContext) + const { sampleRelease } = useContext(CompReadyVarsContext) const [matchingTriages, setMatchingTriages] = React.useState([]) const [triageValidationErrors, setTriageValidationErrors] = React.useState([]) diff --git a/sippy-ng/src/components/MiniCard.jsx b/sippy-ng/src/components/MiniCard.jsx index 80b6de71e..3f06c7a9c 100644 --- a/sippy-ng/src/components/MiniCard.jsx +++ b/sippy-ng/src/components/MiniCard.jsx @@ -18,7 +18,7 @@ const useStyles = makeStyles({ cardContent: { textAlign: 'center', }, - miniCard: (props) => ({ + miniCard: (_props) => ({ height: '100%', }), }) diff --git a/sippy-ng/src/components/NumberCard.jsx b/sippy-ng/src/components/NumberCard.jsx index b7a01db85..8e88a35a0 100644 --- a/sippy-ng/src/components/NumberCard.jsx +++ b/sippy-ng/src/components/NumberCard.jsx @@ -1,6 +1,6 @@ import { Box, Card, CardContent, Tooltip, Typography } from '@mui/material' import { Link } from 'react-router-dom' -import { makeStyles, useTheme } from '@mui/styles' +import { makeStyles } from '@mui/styles' import PropTypes from 'prop-types' import React from 'react' @@ -8,14 +8,13 @@ const useStyles = makeStyles({ cardContent: { textAlign: 'center', }, - numberCard: (props) => ({ + numberCard: (_props) => ({ height: '100%', }), }) export default function NumberCard(props) { const classes = useStyles(props) - const theme = useTheme() let card = ( Overview diff --git a/sippy-ng/src/components/SummaryCard.jsx b/sippy-ng/src/components/SummaryCard.jsx index 83542bdd4..43673db1b 100644 --- a/sippy-ng/src/components/SummaryCard.jsx +++ b/sippy-ng/src/components/SummaryCard.jsx @@ -11,7 +11,7 @@ const useStyles = makeStyles({ cardContent: { textAlign: 'center', }, - summaryCard: (props) => ({ + summaryCard: (_props) => ({ height: '100%', }), }) diff --git a/sippy-ng/src/datagrid/GridToolbarFilterMenu.jsx b/sippy-ng/src/datagrid/GridToolbarFilterMenu.jsx index f50d75127..4ea27ad93 100644 --- a/sippy-ng/src/datagrid/GridToolbarFilterMenu.jsx +++ b/sippy-ng/src/datagrid/GridToolbarFilterMenu.jsx @@ -82,7 +82,7 @@ export default function GridToolbarFilterMenu(props) { let errored = 0 let newModels = [] - models.map((m, index) => { + models.map((m, _index) => { if (m.errors && m.errors.length > 0) { errored++ } diff --git a/sippy-ng/src/datagrid/GridToolbarViewSelector.jsx b/sippy-ng/src/datagrid/GridToolbarViewSelector.jsx index 6bc13d6b6..912df5bb2 100644 --- a/sippy-ng/src/datagrid/GridToolbarViewSelector.jsx +++ b/sippy-ng/src/datagrid/GridToolbarViewSelector.jsx @@ -32,7 +32,7 @@ export default function GridToolbarViewSelector(props) { open={Boolean(anchor)} onClose={handleClose} > - {Object.entries(props.views).map(([e, v]) => ( + {Object.entries(props.views).map(([e, _v]) => ( ({ +export const StyledDataGrid = styled(DataGrid)(({ _theme }) => ({ '& .wrapHeader .MuiDataGrid-columnHeaderTitle': { textOverflow: 'ellipsis', display: '-webkit-box', diff --git a/sippy-ng/src/helpers.jsx b/sippy-ng/src/helpers.jsx index debbb031e..c311b6c28 100644 --- a/sippy-ng/src/helpers.jsx +++ b/sippy-ng/src/helpers.jsx @@ -11,7 +11,7 @@ export const SafeJSONParam = { decode: (j) => { try { return JSON.parse(decodeURIComponent(j)) - } catch (e) { + } catch (_e) { // return undefined } }, @@ -25,7 +25,7 @@ export const SafeStringParam = { if (s === undefined || s === null) return s try { return decodeURIComponent(s) - } catch (e) { + } catch (_e) { // return undefined } }, diff --git a/sippy-ng/src/jobs/JobAnalysis.jsx b/sippy-ng/src/jobs/JobAnalysis.jsx index 74ac2a917..07f7f82a8 100644 --- a/sippy-ng/src/jobs/JobAnalysis.jsx +++ b/sippy-ng/src/jobs/JobAnalysis.jsx @@ -252,7 +252,7 @@ export function JobAnalysis(props) { y: { max: 100, ticks: { - callback: (value, index, values) => { + callback: (value, _index, _values) => { return `${value}%` }, }, diff --git a/sippy-ng/src/jobs/JobDetailTable.jsx b/sippy-ng/src/jobs/JobDetailTable.jsx index 15c6c23bf..62b9e3feb 100644 --- a/sippy-ng/src/jobs/JobDetailTable.jsx +++ b/sippy-ng/src/jobs/JobDetailTable.jsx @@ -30,7 +30,7 @@ export default function JobDetailTable(props) { setTestDialogOpen(true) } - const closeTestDialog = (details) => { + const closeTestDialog = (_details) => { setTestDialogOpen(false) } diff --git a/sippy-ng/src/jobs/JobStackedChart.jsx b/sippy-ng/src/jobs/JobStackedChart.jsx index ff8429208..a0eed606c 100644 --- a/sippy-ng/src/jobs/JobStackedChart.jsx +++ b/sippy-ng/src/jobs/JobStackedChart.jsx @@ -131,7 +131,7 @@ export function JobStackedChart(props) { }, } - const handleClick = (e) => { + const handleClick = (_e) => { navigate( `/jobs/${ props.release @@ -192,7 +192,7 @@ export function JobStackedChart(props) { } const handleLeave = (e, item, legend) => { - legend.chart.data.datasets.forEach((dataset, index) => { + legend.chart.data.datasets.forEach((dataset, _index) => { dataset.backgroundColor = colorByName[dataset.label] dataset.borderColor = colorByName[dataset.label] }) @@ -233,7 +233,7 @@ export function JobStackedChart(props) { stacked: true, max: 100, ticks: { - callback: (value, index, values) => { + callback: (value, _index, _values) => { return `${value}%` }, }, diff --git a/sippy-ng/src/jobs/JobTable.jsx b/sippy-ng/src/jobs/JobTable.jsx index a95b6a359..d4421674c 100644 --- a/sippy-ng/src/jobs/JobTable.jsx +++ b/sippy-ng/src/jobs/JobTable.jsx @@ -31,7 +31,7 @@ const bookmarks = [ { name: 'Upgrade related', model: [BOOKMARKS.UPGRADE] }, ] -export const getColumns = (config, openBugzillaDialog) => { +export const getColumns = (config, _openBugzillaDialog) => { return { name: { field: 'name', @@ -382,7 +382,7 @@ export const getViews = (props) => { } } -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { '& .wrapHeader .MuiDataGrid-columnHeaderTitle': { textOverflow: 'ellipsis', @@ -441,7 +441,7 @@ function JobTable(props) { const [sort = props.sort, setSort] = useQueryParam('sort', StringParam) - const [jobDetails, setJobDetails] = React.useState({ bugs: [] }) + const [_jobDetails, _setJobDetails] = React.useState({ bugs: [] }) // Update page context for chat (only if this is the main page, not embedded) useEffect(() => { diff --git a/sippy-ng/src/prow_job_runs/IntervalsChart.jsx b/sippy-ng/src/prow_job_runs/IntervalsChart.jsx index edf795a65..e46e24726 100644 --- a/sippy-ng/src/prow_job_runs/IntervalsChart.jsx +++ b/sippy-ng/src/prow_job_runs/IntervalsChart.jsx @@ -96,13 +96,13 @@ const intervalColorizers = { return ['InterestingEvent', '#6E6E6E'] } }, - OperatorAvailable: function (interval) { + OperatorAvailable: function (_interval) { return ['OperatorUnavailable', '#d0312d'] }, - OperatorDegraded: function (interval) { + OperatorDegraded: function (_interval) { return ['OperatorDegraded', '#ffa500'] }, - OperatorProgressing: function (interval) { + OperatorProgressing: function (_interval) { return ['OperatorProgressing', '#fada5e'] }, NodeState: function (interval) { @@ -145,16 +145,16 @@ const intervalColorizers = { return ['KubeletLogError', '#d0312d'] } }, - APIServerGracefulShutdown: function (interval) { + APIServerGracefulShutdown: function (_interval) { return ['GracefulShutdownInterval', '#6E6E6E'] }, - E2EPassed: function (interval) { + E2EPassed: function (_interval) { return ['Passed', '#3cb043'] }, - E2EFailed: function (interval) { + E2EFailed: function (_interval) { return ['Failed', '#d0312d'] }, - E2EFlaked: function (interval) { + E2EFlaked: function (_interval) { return ['Flaked', '#ffa500'] }, PodState: function (interval) { @@ -538,7 +538,7 @@ export default function IntervalsChart(props) { setEnd(event.target.value) } - const resetTimeFilters = (event) => { + const resetTimeFilters = (_event) => { console.log('reset time filters') setStart(eventIntervals[0].from) setEnd(eventIntervals[eventIntervals.length - 1].to) diff --git a/sippy-ng/src/pull_requests/PullRequestsTable.jsx b/sippy-ng/src/pull_requests/PullRequestsTable.jsx index ac77136c4..457cabd2f 100644 --- a/sippy-ng/src/pull_requests/PullRequestsTable.jsx +++ b/sippy-ng/src/pull_requests/PullRequestsTable.jsx @@ -22,7 +22,7 @@ import { useStableJSONQueryParam, } from '../helpers' import { GridView } from '../datagrid/GridView' -import { Link, useLocation } from 'react-router-dom' +import { Link } from 'react-router-dom' import { makeStyles, useTheme } from '@mui/styles' import { ReportEndContext } from '../App' import { StringParam, useQueryParam } from 'use-query-params' @@ -31,8 +31,6 @@ import GridToolbar from '../datagrid/GridToolbar' import PropTypes from 'prop-types' import React, { Fragment, useEffect } from 'react' -const overallTestName = 'Overall' - const bookmarks = [ { name: 'Runs > 10', @@ -40,7 +38,7 @@ const bookmarks = [ }, ] -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { '& .wrapHeader .MuiDataGrid-columnHeaderTitle': { textOverflow: 'ellipsis', @@ -63,10 +61,9 @@ const useStyles = makeStyles((theme) => ({ })) export default function PullRequestsTable(props) { - const { classes } = props + const _classes = props.classes const gridClasses = useStyles() const theme = useTheme() - const location = useLocation().pathname const [fetchError, setFetchError] = React.useState('') const [isLoaded, setLoaded] = React.useState(false) diff --git a/sippy-ng/src/releases/Install.jsx b/sippy-ng/src/releases/Install.jsx index 2bfabe1ab..addc7338e 100644 --- a/sippy-ng/src/releases/Install.jsx +++ b/sippy-ng/src/releases/Install.jsx @@ -1,6 +1,6 @@ import './Install.css' import { Grid, Typography } from '@mui/material' -import { Navigate, Route, Routes, useLocation } from 'react-router-dom' +import { Navigate, Route, Routes } from 'react-router-dom' import Alert from '@mui/material/Alert' import PropTypes from 'prop-types' import React, { Fragment, useEffect } from 'react' @@ -9,7 +9,6 @@ import TestByVariantTable from '../tests/TestByVariantTable' import TopLevelIndicators from './InstallTopLevelIndicators' export default function Install(props) { - const location = useLocation() const basePath = `/install/${props.release}` const [fetchError, setFetchError] = React.useState('') diff --git a/sippy-ng/src/releases/InstallTopLevelIndicators.jsx b/sippy-ng/src/releases/InstallTopLevelIndicators.jsx index 03115e86d..1b95578c1 100644 --- a/sippy-ng/src/releases/InstallTopLevelIndicators.jsx +++ b/sippy-ng/src/releases/InstallTopLevelIndicators.jsx @@ -14,8 +14,6 @@ import React, { Fragment } from 'react' import SummaryCard from '../components/SummaryCard' export default function TopLevelIndicators(props) { - const TOOLTIP = 'Top level install indicators showing install health' - const indicatorCaption = (indicator) => { return ( diff --git a/sippy-ng/src/releases/PayloadStream.jsx b/sippy-ng/src/releases/PayloadStream.jsx index a7827279c..2675a5b5a 100644 --- a/sippy-ng/src/releases/PayloadStream.jsx +++ b/sippy-ng/src/releases/PayloadStream.jsx @@ -27,18 +27,18 @@ export default function PayloadStream(props) { const location = useLocation() const basePath = `/release/${props.release}/streams/${props.arch}/${props.stream}` - const [currentTab, setCurrentTab] = useState(0) - function handleTabChange(event, newValue) { + const [_currentTab, _setCurrentTab] = useState(0) + function _handleTabChange(_event, newValue) { console.warn('Setting new value ' + newValue) - setCurrentTab(newValue) + _setCurrentTab(newValue) } - const [release = props.release, setRelease] = useQueryParam( + const [_release = props.release, _setRelease] = useQueryParam( 'release', StringParam ) - const [arch = props.arch, setArch] = useQueryParam('arch', StringParam) - const [stream = props.stream, setStream] = useQueryParam( + const [arch = props.arch, _setArch] = useQueryParam('arch', StringParam) + const [stream = props.stream, _setStream] = useQueryParam( 'stream', StringParam ) diff --git a/sippy-ng/src/releases/PayloadStreamOverview.jsx b/sippy-ng/src/releases/PayloadStreamOverview.jsx index 80e41378e..64bb23440 100644 --- a/sippy-ng/src/releases/PayloadStreamOverview.jsx +++ b/sippy-ng/src/releases/PayloadStreamOverview.jsx @@ -21,12 +21,12 @@ import SummaryCard from '../components/SummaryCard' function PayloadStreamOverview(props) { const theme = useTheme() - const [release = props.release, setRelease] = useQueryParam( + const [_release = props.release, _setRelease] = useQueryParam( 'release', StringParam ) - const [arch = props.arch, setArch] = useQueryParam('arch', StringParam) - const [stream = props.stream, setStream] = useQueryParam( + const [_arch = props.arch, _setArch] = useQueryParam('arch', StringParam) + const [_stream = props.stream, _setStream] = useQueryParam( 'stream', StringParam ) diff --git a/sippy-ng/src/releases/PayloadStreamTestFailures.jsx b/sippy-ng/src/releases/PayloadStreamTestFailures.jsx index ea1ab00dc..8b457b426 100644 --- a/sippy-ng/src/releases/PayloadStreamTestFailures.jsx +++ b/sippy-ng/src/releases/PayloadStreamTestFailures.jsx @@ -85,12 +85,12 @@ function PayloadStreamTestFailures(props) { }, ] - const [release = props.release, setRelease] = useQueryParam( + const [release = props.release, _setRelease] = useQueryParam( 'release', StringParam ) - const [arch = props.arch, setArch] = useQueryParam('arch', StringParam) - const [stream = props.stream, setStream] = useQueryParam( + const [arch = props.arch, _setArch] = useQueryParam('arch', StringParam) + const [stream = props.stream, _setStream] = useQueryParam( 'stream', StringParam ) diff --git a/sippy-ng/src/releases/PayloadStreams.jsx b/sippy-ng/src/releases/PayloadStreams.jsx index 114b20ed3..f696ab9fe 100644 --- a/sippy-ng/src/releases/PayloadStreams.jsx +++ b/sippy-ng/src/releases/PayloadStreams.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types' import React, { Fragment } from 'react' import SimpleBreadcrumbs from '../components/SimpleBreadcrumbs' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ title: { textAlign: 'center', }, diff --git a/sippy-ng/src/releases/PayloadTestFailures.jsx b/sippy-ng/src/releases/PayloadTestFailures.jsx index 9d09c6705..247219087 100644 --- a/sippy-ng/src/releases/PayloadTestFailures.jsx +++ b/sippy-ng/src/releases/PayloadTestFailures.jsx @@ -70,7 +70,7 @@ function PayloadTestFailures(props) { }, ] - const [payload = props.payload, setPayload] = useQueryParam( + const [payload = props.payload, _setPayload] = useQueryParam( 'payload', StringParam ) diff --git a/sippy-ng/src/releases/ReleasePayloadDetails.jsx b/sippy-ng/src/releases/ReleasePayloadDetails.jsx index be5776ac0..c77a65676 100644 --- a/sippy-ng/src/releases/ReleasePayloadDetails.jsx +++ b/sippy-ng/src/releases/ReleasePayloadDetails.jsx @@ -42,7 +42,7 @@ export default function ReleasePayloadDetails(props) { const [tag, setTag] = React.useState({}) - const [releaseTag = props.releaseTag, setReleaseTag] = useQueryParam( + const [releaseTag = props.releaseTag, _setReleaseTag] = useQueryParam( 'release_tag', StringParam ) diff --git a/sippy-ng/src/releases/ReleasePayloads.jsx b/sippy-ng/src/releases/ReleasePayloads.jsx index 8f562b394..fd82a26a6 100644 --- a/sippy-ng/src/releases/ReleasePayloads.jsx +++ b/sippy-ng/src/releases/ReleasePayloads.jsx @@ -5,7 +5,7 @@ import React, { Fragment } from 'react' import ReleasePayloadTable from './ReleasePayloadTable' import SimpleBreadcrumbs from '../components/SimpleBreadcrumbs' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ title: { textAlign: 'center', }, diff --git a/sippy-ng/src/releases/Upgrades.jsx b/sippy-ng/src/releases/Upgrades.jsx index 94a81d529..e9cf73e75 100644 --- a/sippy-ng/src/releases/Upgrades.jsx +++ b/sippy-ng/src/releases/Upgrades.jsx @@ -1,6 +1,6 @@ import './Upgrades.css' import { Grid, Typography } from '@mui/material' -import { Navigate, Route, Routes, useLocation } from 'react-router-dom' +import { Navigate, Route, Routes } from 'react-router-dom' import Alert from '@mui/material/Alert' import PropTypes from 'prop-types' import React, { Fragment, useEffect } from 'react' @@ -11,7 +11,6 @@ import TestByVariantTable from '../tests/TestByVariantTable' * Upgrades is the landing page for upgrades. */ export default function Upgrades(props) { - const location = useLocation() const basePath = `/upgrade/${props.release}` const [fetchError, setFetchError] = React.useState('') diff --git a/sippy-ng/src/repositories/RepositoriesTable.jsx b/sippy-ng/src/repositories/RepositoriesTable.jsx index 2c5b7c9bc..bd8d7b327 100644 --- a/sippy-ng/src/repositories/RepositoriesTable.jsx +++ b/sippy-ng/src/repositories/RepositoriesTable.jsx @@ -26,7 +26,7 @@ import InfoIcon from '@mui/icons-material/Info' import PropTypes from 'prop-types' import React, { Fragment, useEffect } from 'react' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { '& .wrapHeader .MuiDataGrid-columnHeaderTitle': { textOverflow: 'ellipsis', diff --git a/sippy-ng/src/repositories/RepositoryDetails.jsx b/sippy-ng/src/repositories/RepositoryDetails.jsx index 3cdcbe440..05927e959 100644 --- a/sippy-ng/src/repositories/RepositoryDetails.jsx +++ b/sippy-ng/src/repositories/RepositoryDetails.jsx @@ -8,7 +8,7 @@ import PullRequestsTable from '../pull_requests/PullRequestsTable' import React, { Fragment, useEffect } from 'react' import SimpleBreadcrumbs from '../components/SimpleBreadcrumbs' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ root: { flexGrow: 1, }, diff --git a/sippy-ng/src/tests/FeatureGates.jsx b/sippy-ng/src/tests/FeatureGates.jsx index aefe5f67d..3c0128e02 100644 --- a/sippy-ng/src/tests/FeatureGates.jsx +++ b/sippy-ng/src/tests/FeatureGates.jsx @@ -299,7 +299,7 @@ export default function FeatureGates(props) { const basename = '/sippy-ng' const path = url.pathname return path.startsWith(basename) ? path.slice(basename.length) : path - } catch (e) { + } catch (_e) { // fall through } } diff --git a/sippy-ng/src/tests/TestOutputs.jsx b/sippy-ng/src/tests/TestOutputs.jsx index 85abeb70e..ca41fac4f 100644 --- a/sippy-ng/src/tests/TestOutputs.jsx +++ b/sippy-ng/src/tests/TestOutputs.jsx @@ -15,7 +15,7 @@ import Alert from '@mui/material/Alert' import PropTypes from 'prop-types' import React, { Fragment, useEffect } from 'react' -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ table: { '& .MuiTableCell-root': { border: '1px solid #cccccc', diff --git a/sippy-ng/src/tests/TestPassRateCharts.jsx b/sippy-ng/src/tests/TestPassRateCharts.jsx index 51727e8c3..f90df5176 100644 --- a/sippy-ng/src/tests/TestPassRateCharts.jsx +++ b/sippy-ng/src/tests/TestPassRateCharts.jsx @@ -107,19 +107,6 @@ export default function TestPassRateCharts(props) { datasets: [], } - const columns = [ - { - field: 'id', - hide: true, - filterable: false, - }, - { - field: 'name', - headerName: props.grouping, - flex: 4, - }, - ] - const options = { parsing: { xAxisKey: 'date', @@ -142,7 +129,7 @@ export default function TestPassRateCharts(props) { y: { max: 100, ticks: { - callback: (value, index, values) => { + callback: (value, _index, _values) => { return `${value}%` }, }, diff --git a/sippy-ng/src/tests/TestStackedChart.jsx b/sippy-ng/src/tests/TestStackedChart.jsx index b61a8db58..4261282dc 100644 --- a/sippy-ng/src/tests/TestStackedChart.jsx +++ b/sippy-ng/src/tests/TestStackedChart.jsx @@ -157,7 +157,7 @@ export function TestStackedChart(props) { } const handleLeave = (e, item, legend) => { - legend.chart.data.datasets.forEach((dataset, index) => { + legend.chart.data.datasets.forEach((dataset, _index) => { dataset.backgroundColor = colorByName[dataset.label] dataset.borderColor = colorByName[dataset.label] }) @@ -185,7 +185,7 @@ export function TestStackedChart(props) { stacked: true, max: 100, ticks: { - callback: (value, index, values) => { + callback: (value, _index, _values) => { return `${value}%` }, }, diff --git a/sippy-ng/src/tests/TestTable.jsx b/sippy-ng/src/tests/TestTable.jsx index fbc95ce1d..0e555af8d 100644 --- a/sippy-ng/src/tests/TestTable.jsx +++ b/sippy-ng/src/tests/TestTable.jsx @@ -112,7 +112,7 @@ function isComponentReadinessIncludedJobTier(variant) { ) } -const useStyles = makeStyles((theme) => ({ +const useStyles = makeStyles((_theme) => ({ backdrop: { zIndex: 999999, color: '#fff', @@ -153,7 +153,7 @@ function TestTable(props) { NumberParam ) - const [cookies, setCookie] = useCookies(['testTableDBSource']) + const [cookies, _setCookie] = useCookies(['testTableDBSource']) const testTableDBSource = cookies['testTableDBSource'] // For "Tests By Variant" (collapse=false), check if any non-default filters are applied