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]) => (