diff --git a/tests/ui/job-view/Filtering_test.jsx b/tests/ui/job-view/Filtering_test.jsx index eac361a6ecd..b333fea7d87 100644 --- a/tests/ui/job-view/Filtering_test.jsx +++ b/tests/ui/job-view/Filtering_test.jsx @@ -190,10 +190,12 @@ describe('Filtering', () => { }); test('should have 1 push', async () => { - const { getAllByText, getAllByTestId, getByText, getByTitle } = render( - testApp(), - { legacyRoot: true }, - ); + const { + getAllByText, + getAllByTestId, + getByText, + getByTitle, + } = render(testApp(), { legacyRoot: true }); const unfilteredPushes = await waitFor(() => getAllByTestId('push-header'), ); @@ -492,8 +494,12 @@ describe('Filtering', () => { }); test('Filters | Reset should get back to original set of jobs', async () => { - const { getAllByText, findAllByText, findByText, queryAllByText } = - render(testApp(), { legacyRoot: true }); + const { + getAllByText, + findAllByText, + findByText, + queryAllByText, + } = render(testApp(), { legacyRoot: true }); const symbolToRemove = 'yaml'; await findAllByText('B'); diff --git a/tests/ui/job-view/Push_test.jsx b/tests/ui/job-view/Push_test.jsx index 874c52050b8..175ee934111 100644 --- a/tests/ui/job-view/Push_test.jsx +++ b/tests/ui/job-view/Push_test.jsx @@ -71,7 +71,8 @@ describe('Transformations', () => { expected: 'devtools/client/framework/browser-toolbox/test/browser.ini', }, { - path: 'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js', + path: + 'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js', expected: 'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js', }, diff --git a/tests/ui/job-view/details/PinBoard_test.jsx b/tests/ui/job-view/details/PinBoard_test.jsx index fd6a3a11c13..6618739ece1 100644 --- a/tests/ui/job-view/details/PinBoard_test.jsx +++ b/tests/ui/job-view/details/PinBoard_test.jsx @@ -270,8 +270,12 @@ describe('DetailsPanel', () => { }); test('classify and unclassify all jobs', async () => { - const { getByPlaceholderText, getByText, getByTitle, queryAllByTitle } = - render(testDetailsPanel(), { legacyRoot: true }); + const { + getByPlaceholderText, + getByText, + getByTitle, + queryAllByTitle, + } = render(testDetailsPanel(), { legacyRoot: true }); store.dispatch(pinJobs(jobList.data)); store.dispatch(setSelectedJob(jobList.data[1], true)); diff --git a/tests/ui/perfherder/alerts-view/alerts_test.jsx b/tests/ui/perfherder/alerts-view/alerts_test.jsx index 38d039a9f05..ed7d803c178 100644 --- a/tests/ui/perfherder/alerts-view/alerts_test.jsx +++ b/tests/ui/perfherder/alerts-view/alerts_test.jsx @@ -469,8 +469,11 @@ test("'Take' button hides when clicking on 'Unassigned' badge", async () => { alertSummary.assignee_email = 'test_user@mozilla.com'; alertSummary.assignee_username = 'mozilla-ldap/test_user@mozilla.com'; - const { getByText, queryByText, queryByPlaceholderText } = - alertsViewControls(); + const { + getByText, + queryByText, + queryByPlaceholderText, + } = alertsViewControls(); const unassignedBadge = await waitFor(() => getByText('Unassigned')); @@ -658,8 +661,11 @@ const assertAlertsAreInOrder = async (alertsInOrder, alertTableRows) => { }; test(`table data can be sorted in descending order by 'Test'`, async () => { - const { getAllByLabelText, getByTestId, getAllByTitle } = - alertsViewControls(); + const { + getAllByLabelText, + getByTestId, + getAllByTitle, + } = alertsViewControls(); let alertTableRows = await waitFor(() => getAllByLabelText('Alert table row'), @@ -694,8 +700,11 @@ test(`table data can be sorted in descending order by 'Test'`, async () => { }); test(`table data can be sorted in ascending order by 'Platform'`, async () => { - const { getByTestId, getAllByLabelText, getAllByTitle } = - alertsViewControls(); + const { + getByTestId, + getAllByLabelText, + getAllByTitle, + } = alertsViewControls(); let alertTableRows = await waitFor(() => getAllByLabelText('Alert table row'), @@ -737,8 +746,11 @@ test(`table data cannot be sorted by 'Tags & Options'`, async () => { }); test(`table data can be sorted in ascending order by 'Confidence'`, async () => { - const { getAllByLabelText, getByTestId, getAllByTitle } = - alertsViewControls(); + const { + getAllByLabelText, + getByTestId, + getAllByTitle, + } = alertsViewControls(); let alertTableRows = await waitFor(() => getAllByLabelText('Alert table row'), @@ -770,8 +782,11 @@ test(`table data can be sorted in ascending order by 'Confidence'`, async () => }); test(`table data can be sorted in ascending order by 'Magnitude of Change'`, async () => { - const { getAllByLabelText, getByTestId, getAllByTitle } = - alertsViewControls(); + const { + getAllByLabelText, + getByTestId, + getAllByTitle, + } = alertsViewControls(); let alertTableRows = await waitFor(() => getAllByLabelText('Alert table row'), @@ -804,8 +819,11 @@ test(`table data can be sorted in ascending order by 'Magnitude of Change'`, asy }); test('Data can be sorted only by one column', async () => { - const { getAllByLabelText, getByTestId, getAllByTitle } = - alertsViewControls(); + const { + getAllByLabelText, + getByTestId, + getAllByTitle, + } = alertsViewControls(); let alertTableRows = await waitFor(() => getAllByLabelText('Alert table row'), diff --git a/tests/ui/perfherder/compare-view/compare_table_test.jsx b/tests/ui/perfherder/compare-view/compare_table_test.jsx index b518248c731..678dcf66a8e 100644 --- a/tests/ui/perfherder/compare-view/compare_table_test.jsx +++ b/tests/ui/perfherder/compare-view/compare_table_test.jsx @@ -346,8 +346,9 @@ test('filters that are not enabled are removed from URL params', async () => { }); test('page parameter updates with value 2 when clicking on the second page', async () => { - const { getByText, findAllByLabelText } = - compareTableControls(compareResults); + const { getByText, findAllByLabelText } = compareTableControls( + compareResults, + ); const result1 = await waitFor(() => getByText(compareTablesControlsResults[0].name), @@ -376,8 +377,11 @@ test('page parameter updates with value 2 when clicking on the second page', asy }); test('text input filter results should differ when filter button(s) are selected', async () => { - const { getByText, getByPlaceholderText, queryByText } = - compareTableControls(); + const { + getByText, + getByPlaceholderText, + queryByText, + } = compareTableControls(); const result1 = await waitFor(() => getByText(result[0].name)); const result2 = await waitFor(() => getByText(result[1].name)); diff --git a/tests/ui/perfherder/graphs-view/graphs_view_test.jsx b/tests/ui/perfherder/graphs-view/graphs_view_test.jsx index 9c0401abc77..f1461b5ad0e 100644 --- a/tests/ui/perfherder/graphs-view/graphs_view_test.jsx +++ b/tests/ui/perfherder/graphs-view/graphs_view_test.jsx @@ -279,8 +279,12 @@ test('Using select query param displays tooltip for correct datapoint with repli }); test('InputFilter from TestDataModal can filter by application name', async () => { - const { getByText, getByTestId, getByPlaceholderText, getByTitle } = - graphsViewControls(); + const { + getByText, + getByTestId, + getByPlaceholderText, + getByTitle, + } = graphsViewControls(); const { name, application, projectName, platform } = seriesData[0]; const fullTestName = projectName.concat( @@ -310,8 +314,12 @@ test('InputFilter from TestDataModal can filter by application name', async () = test('Changing the platform dropdown while filtered by text in the Test Data Modal displays expected tests', async () => { mockShowModal.mockClear(); - const { getByText, getByPlaceholderText, getByTitle, getByTestId } = - graphsViewControls(); + const { + getByText, + getByPlaceholderText, + getByTitle, + getByTestId, + } = graphsViewControls(); fireEvent.click(getByText('Add test data')); diff --git a/tests/ui/perfherder/replicates_graph_test.jsx b/tests/ui/perfherder/replicates_graph_test.jsx index 8479de20266..975d6a63db9 100644 --- a/tests/ui/perfherder/replicates_graph_test.jsx +++ b/tests/ui/perfherder/replicates_graph_test.jsx @@ -23,8 +23,31 @@ const mockedReplicateData = { lowerIsBetter: true, name: SUBTEST_NAME, replicates: [ - 500, 345, 366, 358, 355, 365, 354, 354, 363, 360, 389, 357, 273, - 376, 350, 381, 373, 356, 351, 348, 271, 354, 351, 360, 385, + 500, + 345, + 366, + 358, + 355, + 365, + 354, + 354, + 363, + 360, + 389, + 357, + 273, + 376, + 350, + 381, + 373, + 356, + 351, + 348, + 271, + 354, + 351, + 360, + 385, ], shouldAlert: false, unit: 'ms', @@ -35,8 +58,31 @@ const mockedReplicateData = { lowerIsBetter: true, name: 'tablemutation.html', replicates: [ - 89, 88, 90, 83, 87, 87, 88, 86, 85, 84, 85, 88, 102, 83, 100, 86, - 100, 80, 87, 88, 82, 85, 84, 83, 86, + 89, + 88, + 90, + 83, + 87, + 87, + 88, + 86, + 85, + 84, + 85, + 88, + 102, + 83, + 100, + 86, + 100, + 80, + 87, + 88, + 82, + 85, + 84, + 83, + 86, ], shouldAlert: false, unit: 'ms', @@ -52,8 +98,26 @@ const mockedReplicateData = { { name: 'ts_paint', replicates: [ - 844, 832, 842, 825, 849, 816, 857, 841, 849, 840, 846, 872, 864, - 837, 830, 843, 841, 854, 841, 858, + 844, + 832, + 842, + 825, + 849, + 816, + 857, + 841, + 849, + 840, + 846, + 872, + 864, + 837, + 830, + 843, + 841, + 854, + 841, + 858, ], value: 842, }, @@ -70,12 +134,26 @@ const mockedReplicateData = { lowerIsBetter: true, name: '', replicates: [ - 552.9000000000001, 561.6599999999999, 558.1199999999999, - 565.0799999999999, 554.94, 599.9399999999998, 600.9200000000001, - 559.22, 552.0600000000002, 559.4000000000001, 603.0999999999999, - 586.4199999999998, 587.3200000000002, 606.3800000000001, - 587.1000000000001, 592.9200000000001, 542.9199999999998, 553.98, - 556.4200000000001, 576.0999999999999, + 552.9000000000001, + 561.6599999999999, + 558.1199999999999, + 565.0799999999999, + 554.94, + 599.9399999999998, + 600.9200000000001, + 559.22, + 552.0600000000002, + 559.4000000000001, + 603.0999999999999, + 586.4199999999998, + 587.3200000000002, + 606.3800000000001, + 587.1000000000001, + 592.9200000000001, + 542.9199999999998, + 553.98, + 556.4200000000001, + 576.0999999999999, ], shouldAlert: false, unit: 'ms', diff --git a/tests/ui/push-health/details/DetailsPanel_test.jsx b/tests/ui/push-health/details/DetailsPanel_test.jsx index efdac578d2a..32d3fac88b5 100644 --- a/tests/ui/push-health/details/DetailsPanel_test.jsx +++ b/tests/ui/push-health/details/DetailsPanel_test.jsx @@ -65,7 +65,8 @@ describe('DetailsPanel', () => { }, line_number: 18841, }, - line: '22:42:53 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/helpers.js:358 - TypeError: can\'t access property "wrapClass", lineInfo is null', + line: + '22:42:53 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/helpers.js:358 - TypeError: can\'t access property "wrapClass", lineInfo is null', line_number: 18841, }, ], diff --git a/ui/helpers/job.js b/ui/helpers/job.js index ae0848b5d5a..4a32e9eabb8 100644 --- a/ui/helpers/job.js +++ b/ui/helpers/job.js @@ -237,8 +237,7 @@ export const getTaskRunStr = (job) => `${job.task_id}.${job.retry_id}`; // This matches as taskId, optionally followed by `.` or`-` and a runId. // We support `-` for backwards compatability with the original format used. -const taskRunPattern = - /^([A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw])(?:[-.]([0-9]+))?$/; +const taskRunPattern = /^([A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw])(?:[-.]([0-9]+))?$/; export const getTaskRun = function getTaskRun(taskRunStr) { const match = taskRunPattern.exec(taskRunStr); diff --git a/ui/helpers/performance.js b/ui/helpers/performance.js index b859e9ddd5c..773c272c124 100644 --- a/ui/helpers/performance.js +++ b/ui/helpers/performance.js @@ -1,4 +1,5 @@ // This file may export additional functions. +/* eslint-disable import/prefer-default-export */ import TaskclusterModel from '../models/taskcluster'; diff --git a/ui/helpers/revision.js b/ui/helpers/revision.js index f3e2fe77bef..3e6c43562e6 100644 --- a/ui/helpers/revision.js +++ b/ui/helpers/revision.js @@ -24,7 +24,7 @@ export const getRevisionTitle = function getRevisionTitle(revisions) { * Strip out unwanted things like additional lines, trychooser * syntax, request flags, mq cruft, whitespace, and punctuation */ - + // eslint-disable-next-line prefer-destructuring title = title.split('\n')[0]; title = title.replace(/\btry: .*/, ''); title = title.replace(/\b(r|sr|f|a)=.*/, ''); diff --git a/ui/helpers/sort.js b/ui/helpers/sort.js index 6b64c013184..45d17cfa87c 100644 --- a/ui/helpers/sort.js +++ b/ui/helpers/sort.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/prefer-default-export export const sortAlphaNum = (a, b) => { // Implement a better alphanumeric sort so that mochitest-10 // is sorted after mochitest 9, not mochitest-1 diff --git a/ui/helpers/taskcluster.js b/ui/helpers/taskcluster.js index ab9f70f0bd4..e6e6c7b8cbd 100644 --- a/ui/helpers/taskcluster.js +++ b/ui/helpers/taskcluster.js @@ -80,6 +80,7 @@ const taskcluster = (() => { userCredentials[_rootUrl] && moment(userCredentials[_rootUrl].expires).isAfter(moment()) ) { + // eslint-disable-next-line no-promise-executor-return return resolve(userCredentials[_rootUrl]); } diff --git a/ui/helpers/utils.js b/ui/helpers/utils.js index 9e20da7ac1b..b901cfd6d4a 100644 --- a/ui/helpers/utils.js +++ b/ui/helpers/utils.js @@ -1,3 +1,5 @@ +/* eslint-disable no-bitwise */ + export const hashFunction = (someString) => { // Borrowed from https://github.com/darkskyapp/string-hash let hash = 5381; diff --git a/ui/infra-compare/InfraCompareTableView.jsx b/ui/infra-compare/InfraCompareTableView.jsx index 984485060ad..bfb9b6358ca 100644 --- a/ui/infra-compare/InfraCompareTableView.jsx +++ b/ui/infra-compare/InfraCompareTableView.jsx @@ -66,8 +66,12 @@ export default class InfraCompareTableView extends React.Component { getInfraData = async () => { const { getQueryParams, getDisplayResults } = this.props; - const { originalProject, originalRevision, newProject, newRevision } = - this.props.validated; + const { + originalProject, + originalRevision, + newProject, + newRevision, + } = this.props.validated; const { timeRange, failureMessages } = this.state; this.setState({ loading: true }); @@ -139,8 +143,13 @@ export default class InfraCompareTableView extends React.Component { pageTitle, } = this.props.validated; const { jobsNotDisplayed } = this.props; - const { compareResults, loading, failureMessages, timeRange, tabTitle } = - this.state; + const { + compareResults, + loading, + failureMessages, + timeRange, + tabTitle, + } = this.state; const compareDropdowns = []; const params = { originalProject, diff --git a/ui/intermittent-failures/MainView.jsx b/ui/intermittent-failures/MainView.jsx index 01d4ed3ef04..cce02dac95b 100644 --- a/ui/intermittent-failures/MainView.jsx +++ b/ui/intermittent-failures/MainView.jsx @@ -99,8 +99,12 @@ const MainView = (props) => { let totalRuns = 0; if (graphData.length) { - ({ graphOneData, graphTwoData, totalFailures, totalRuns } = - calculateMetrics(graphData)); + ({ + graphOneData, + graphTwoData, + totalFailures, + totalRuns, + } = calculateMetrics(graphData)); graphOneData = { all: graphOneData }; graphOneData.all[0].count = tableData.length; } diff --git a/ui/intermittent-failures/constants.js b/ui/intermittent-failures/constants.js index 385dc24b26a..43a4ced6a38 100644 --- a/ui/intermittent-failures/constants.js +++ b/ui/intermittent-failures/constants.js @@ -1,3 +1,4 @@ +/* eslint-disable import/prefer-default-export */ export const treeOptions = [ 'all', 'trunk', diff --git a/ui/job-view/App.jsx b/ui/job-view/App.jsx index 7a8cac4fc4e..bfb3ad66ece 100644 --- a/ui/job-view/App.jsx +++ b/ui/job-view/App.jsx @@ -128,8 +128,11 @@ class App extends React.Component { this.setState({ serverRev: revision }); this.updateInterval = setInterval(() => { this.fetchDeployedRevision().then((revision) => { - const { serverChangedTimestamp, serverRev, serverChanged } = - this.state; + const { + serverChangedTimestamp, + serverRev, + serverChanged, + } = this.state; if (serverChanged) { if ( diff --git a/ui/job-view/CustomJobActions.jsx b/ui/job-view/CustomJobActions.jsx index fd0d6550152..c4c9b9b913f 100644 --- a/ui/job-view/CustomJobActions.jsx +++ b/ui/job-view/CustomJobActions.jsx @@ -48,8 +48,12 @@ class CustomJobActions extends React.PureComponent { const { id: decisionTaskId } = decisionTaskMap[pushId]; TaskclusterModel.load(decisionTaskId, job, currentRepo).then((results) => { - const { originalTask, originalTaskId, staticActionVariables, actions } = - results; + const { + originalTask, + originalTaskId, + staticActionVariables, + actions, + } = results; if (actions.length) { const mappedActions = keyBy(actions, 'name'); diff --git a/ui/job-view/details/PinBoard.jsx b/ui/job-view/details/PinBoard.jsx index 2f6259833f7..45781bccd60 100644 --- a/ui/job-view/details/PinBoard.jsx +++ b/ui/job-view/details/PinBoard.jsx @@ -139,8 +139,10 @@ class PinBoard extends React.Component { createNewClassification = () => { const { email } = this.props; - const { failureClassificationId, failureClassificationComment } = - this.props; + const { + failureClassificationId, + failureClassificationComment, + } = this.props; return new JobClassificationModel({ text: failureClassificationComment, @@ -272,12 +274,14 @@ class PinBoard extends React.Component { recalculateUnclassifiedCounts, } = this.props; - const { data, failureStatus } = - await JobClassificationTypeAndBugsModel.destroy( - Object.values(pinnedJobs), - currentRepo, - notify, - ); + const { + data, + failureStatus, + } = await JobClassificationTypeAndBugsModel.destroy( + Object.values(pinnedJobs), + currentRepo, + notify, + ); if (!failureStatus) { for (const pinnedJob of Object.values(pinnedJobs)) { @@ -303,8 +307,10 @@ class PinBoard extends React.Component { canSaveClassifications = () => { const { pinnedJobBugs, isLoggedIn, currentRepo } = this.props; - const { failureClassificationId, failureClassificationComment } = - this.props; + const { + failureClassificationId, + failureClassificationComment, + } = this.props; return ( this.hasPinnedJobs() && @@ -322,8 +328,10 @@ class PinBoard extends React.Component { // Facilitates Clear all if no jobs pinned to reset pinBoard UI pinboardIsDirty = () => { - const { failureClassificationId, failureClassificationComment } = - this.props; + const { + failureClassificationId, + failureClassificationComment, + } = this.props; return ( failureClassificationComment !== '' || diff --git a/ui/job-view/details/summary/ActionBar.jsx b/ui/job-view/details/summary/ActionBar.jsx index 448bbfc64bf..7ee0179859a 100644 --- a/ui/job-view/details/summary/ActionBar.jsx +++ b/ui/job-view/details/summary/ActionBar.jsx @@ -95,8 +95,12 @@ class ActionBar extends React.PureComponent { }; createGeckoProfile = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; return triggerTask( selectedJobFull, notify, @@ -107,8 +111,12 @@ class ActionBar extends React.PureComponent { }; createSideBySide = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; await triggerTask( selectedJobFull, notify, @@ -137,8 +145,12 @@ class ActionBar extends React.PureComponent { }; backfillJob = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; if (!this.canBackfill()) { return; @@ -185,8 +197,12 @@ class ActionBar extends React.PureComponent { }; confirmFailure = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; const { id: decisionTaskId } = decisionTaskMap[selectedJobFull.push_id]; if (!canConfirmFailure(selectedJobFull)) { @@ -274,8 +290,13 @@ class ActionBar extends React.PureComponent { }; createInteractiveTask = async () => { - const { user, selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + user, + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; const { id: decisionTaskId } = decisionTaskMap[selectedJobFull.push_id]; const results = await TaskclusterModel.load( diff --git a/ui/job-view/details/summary/LogItem.jsx b/ui/job-view/details/summary/LogItem.jsx index d3aa47d6345..14a7eef2373 100644 --- a/ui/job-view/details/summary/LogItem.jsx +++ b/ui/job-view/details/summary/LogItem.jsx @@ -47,8 +47,13 @@ function getLogUrlProps(logKey, logUrl, logViewerUrl, logViewerFullUrl) { } export default function LogItem(props) { - const { logUrls, logViewerUrl, logViewerFullUrl, logKey, logDescription } = - props; + const { + logUrls, + logViewerUrl, + logViewerFullUrl, + logKey, + logDescription, + } = props; return (
  • diff --git a/ui/job-view/details/tabs/AnnotationsTab.jsx b/ui/job-view/details/tabs/AnnotationsTab.jsx index 176a7a6e364..7fdc23a354a 100644 --- a/ui/job-view/details/tabs/AnnotationsTab.jsx +++ b/ui/job-view/details/tabs/AnnotationsTab.jsx @@ -179,8 +179,11 @@ class AnnotationsTab extends React.Component { }; deleteClassification = async (classification) => { - const { selectedJobFull, recalculateUnclassifiedCounts, notify } = - this.props; + const { + selectedJobFull, + recalculateUnclassifiedCounts, + notify, + } = this.props; selectedJobFull.failure_classification_id = 1; recalculateUnclassifiedCounts(); diff --git a/ui/job-view/details/tabs/PerformanceTab.jsx b/ui/job-view/details/tabs/PerformanceTab.jsx index 074c109d60a..a8980836b42 100644 --- a/ui/job-view/details/tabs/PerformanceTab.jsx +++ b/ui/job-view/details/tabs/PerformanceTab.jsx @@ -51,8 +51,12 @@ class PerformanceTab extends React.PureComponent { } createGeckoProfile = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; await triggerTask( selectedJobFull, notify, @@ -66,8 +70,12 @@ class PerformanceTab extends React.PureComponent { }; createSideBySide = async () => { - const { selectedJobFull, notify, decisionTaskMap, currentRepo } = - this.props; + const { + selectedJobFull, + notify, + decisionTaskMap, + currentRepo, + } = this.props; await triggerTask( selectedJobFull, notify, @@ -151,8 +159,13 @@ class PerformanceTab extends React.PureComponent { }; render() { - const { repoName, revision, selectedJobFull, jobDetails, perfJobDetail } = - this.props; + const { + repoName, + revision, + selectedJobFull, + jobDetails, + perfJobDetail, + } = this.props; const { triggeredGeckoProfiles, showSideBySide } = this.state; // Just to be safe, use the same isPerfTest check the other diff --git a/ui/job-view/details/tabs/SimilarJobsTab.jsx b/ui/job-view/details/tabs/SimilarJobsTab.jsx index 1fda1fb2181..b3cca3527a6 100644 --- a/ui/job-view/details/tabs/SimilarJobsTab.jsx +++ b/ui/job-view/details/tabs/SimilarJobsTab.jsx @@ -48,8 +48,10 @@ class SimilarJobsTab extends React.Component { options.nosuccess = ''; } - const { data: newSimilarJobs, failureStatus } = - await JobModel.getSimilarJobs(selectedJobFull.id, options); + const { + data: newSimilarJobs, + failureStatus, + } = await JobModel.getSimilarJobs(selectedJobFull.id, options); if (!failureStatus) { this.setState({ hasNextPage: newSimilarJobs.length > this.pageSize }); diff --git a/ui/job-view/details/tabs/TabsPanel.jsx b/ui/job-view/details/tabs/TabsPanel.jsx index 3be32867d26..49f2655e1a7 100644 --- a/ui/job-view/details/tabs/TabsPanel.jsx +++ b/ui/job-view/details/tabs/TabsPanel.jsx @@ -78,9 +78,8 @@ class TabsPanel extends React.Component { onSelectNextTab = () => { const { tabIndex } = this.state; const nextIndex = tabIndex + 1; - const tabCount = TabsPanel.getTabNames( - showTabsFromProps(this.props), - ).length; + const tabCount = TabsPanel.getTabNames(showTabsFromProps(this.props)) + .length; this.setState({ tabIndex: nextIndex < tabCount ? nextIndex : 0 }); }; diff --git a/ui/job-view/pushes/JobButton.jsx b/ui/job-view/pushes/JobButton.jsx index 104d9b4ef96..261448a352f 100644 --- a/ui/job-view/pushes/JobButton.jsx +++ b/ui/job-view/pushes/JobButton.jsx @@ -39,8 +39,12 @@ export default class JobButtonComponent extends React.Component { * shallow compare would allow. */ shouldComponentUpdate(nextProps, nextState) { - const { visible, resultStatus, failureClassificationId, intermittent } = - this.props; + const { + visible, + resultStatus, + failureClassificationId, + intermittent, + } = this.props; const { isSelected, isRunnableSelected } = this.state; return ( diff --git a/ui/job-view/pushes/PushActionMenu.jsx b/ui/job-view/pushes/PushActionMenu.jsx index 56777e78a15..cfeb460a0a6 100644 --- a/ui/job-view/pushes/PushActionMenu.jsx +++ b/ui/job-view/pushes/PushActionMenu.jsx @@ -43,8 +43,13 @@ class PushActionMenu extends React.PureComponent { }; triggerMissingJobs = () => { - const { notify, revision, pushId, currentRepo, decisionTaskMap } = - this.props; + const { + notify, + revision, + pushId, + currentRepo, + decisionTaskMap, + } = this.props; const decisionTask = decisionTaskMap[pushId]; if ( diff --git a/ui/job-view/pushes/PushList.jsx b/ui/job-view/pushes/PushList.jsx index ba9c5c901f1..5f060d41ac8 100644 --- a/ui/job-view/pushes/PushList.jsx +++ b/ui/job-view/pushes/PushList.jsx @@ -36,8 +36,12 @@ class PushList extends React.Component { } componentDidUpdate(prevProps) { - const { notify, jobMap, jobsLoaded, setSelectedJobFromQueryString } = - this.props; + const { + notify, + jobMap, + jobsLoaded, + setSelectedJobFromQueryString, + } = this.props; if (jobsLoaded && jobsLoaded !== prevProps.jobsLoaded) { setSelectedJobFromQueryString(notify, jobMap); diff --git a/ui/logviewer/App.jsx b/ui/logviewer/App.jsx index 64e1402f1ae..fe6de43f3ad 100644 --- a/ui/logviewer/App.jsx +++ b/ui/logviewer/App.jsx @@ -214,8 +214,9 @@ class App extends React.PureComponent { selectedLogText = window.getSelection().toString().trim(); } - const descriptionField = - window.opener.document.getElementById('summary-input'); + const descriptionField = window.opener.document.getElementById( + 'summary-input', + ); const startPos = descriptionField.selectionStart; const endPos = descriptionField.selectionEnd; descriptionField.value = diff --git a/ui/models/bugJobMap.js b/ui/models/bugJobMap.js index bc22a490caf..9274695c1e5 100644 --- a/ui/models/bugJobMap.js +++ b/ui/models/bugJobMap.js @@ -11,11 +11,10 @@ export default class BugJobMapModel { // the options parameter is used to filter/limit the list of objects static getList(options) { - return fetch(`${getProjectUrl(uri)}${createQueryParams(options)}`).then( - (resp) => - resp - .json() - .then((data) => data.map((elem) => new BugJobMapModel(elem))), + return fetch( + `${getProjectUrl(uri)}${createQueryParams(options)}`, + ).then((resp) => + resp.json().then((data) => data.map((elem) => new BugJobMapModel(elem))), ); } diff --git a/ui/models/classification.js b/ui/models/classification.js index f3dc38506e6..540eedb7efd 100644 --- a/ui/models/classification.js +++ b/ui/models/classification.js @@ -11,11 +11,12 @@ export default class JobClassificationModel { } static getList(params) { - return fetch(`${getProjectUrl(uri)}${createQueryParams(params)}`).then( - (resp) => - resp - .json() - .then((data) => data.map((elem) => new JobClassificationModel(elem))), + return fetch( + `${getProjectUrl(uri)}${createQueryParams(params)}`, + ).then((resp) => + resp + .json() + .then((data) => data.map((elem) => new JobClassificationModel(elem))), ); } diff --git a/ui/models/job.js b/ui/models/job.js index e3b891a8bce..06578296384 100644 --- a/ui/models/job.js +++ b/ui/models/job.js @@ -36,8 +36,10 @@ export default class JobModel { if (fetchAll && nextUrl) { const page = new URLSearchParams(nextUrl.split('?')[1]).get('page'); const newOptions = { ...options, page }; - const { data: nextData, failureStatus: nextFailureStatus } = - await JobModel.getList(newOptions, config); + const { + data: nextData, + failureStatus: nextFailureStatus, + } = await JobModel.getList(newOptions, config); if (!nextFailureStatus) { nextPagesJobs = nextData; @@ -219,6 +221,7 @@ export default class JobModel { try { notify(`Attempting to cancel selected ${jobTerm} via actions.json`); + /* eslint-disable no-await-in-loop */ for (const job of jobs) { const decisionTaskId = taskIdMap[job.push_id].id; let results; @@ -251,6 +254,7 @@ export default class JobModel { notify(formatTaskclusterError(e), 'danger', { sticky: true }); } } + /* eslint-enable no-await-in-loop */ notify(`Request sent to cancel ${jobTerm} via action.json`, 'success'); } catch (e) { diff --git a/ui/models/perfSeries.js b/ui/models/perfSeries.js index 162234f7b00..07791a652d4 100644 --- a/ui/models/perfSeries.js +++ b/ui/models/perfSeries.js @@ -99,14 +99,15 @@ export default class PerfSeriesModel { if (response.failureStatus) { return response; } - const data = Object.entries(response.data).map( - ([signatureId, signatureProps]) => - getSeriesSummary( - projectName, - signatureId, - signatureProps, - this.optionCollectionMap, - ), + const data = Object.entries( + response.data, + ).map(([signatureId, signatureProps]) => + getSeriesSummary( + projectName, + signatureId, + signatureProps, + this.optionCollectionMap, + ), ); return { data, failureStatus: null }; } diff --git a/ui/perfherder/Validation.jsx b/ui/perfherder/Validation.jsx index c29917271b5..7ce54285181 100644 --- a/ui/perfherder/Validation.jsx +++ b/ui/perfherder/Validation.jsx @@ -9,210 +9,208 @@ import LoadingSpinner from '../shared/LoadingSpinner'; import { summaryStatusMap } from './perf-helpers/constants'; -const withValidation = - ({ requiredParams }, verifyRevisions = true) => - (WrappedComponent) => { - class Validation extends React.Component { - constructor(props) { - super(props); - - this.state = { - originalProject: null, - newProject: null, - originalRevision: null, - newRevision: null, - originalSignature: null, - newSignature: null, - errorMessages: [], - originalResultSet: null, - newResultSet: null, - selectedTimeRange: null, - framework: null, - validationComplete: false, - }; - } +const withValidation = ({ requiredParams }, verifyRevisions = true) => ( + WrappedComponent, +) => { + class Validation extends React.Component { + constructor(props) { + super(props); + + this.state = { + originalProject: null, + newProject: null, + originalRevision: null, + newRevision: null, + originalSignature: null, + newSignature: null, + errorMessages: [], + originalResultSet: null, + newResultSet: null, + selectedTimeRange: null, + framework: null, + validationComplete: false, + }; + } - async componentDidMount() { - this.validateParams( - parseQueryParams(this.props.history.location.search), - ); - } + async componentDidMount() { + this.validateParams(parseQueryParams(this.props.history.location.search)); + } - componentDidUpdate(prevProps) { - const { history } = this.props; + componentDidUpdate(prevProps) { + const { history } = this.props; - // Using location instead of history requires an extra click when - // using the back button to go back to previous location - if (history.location.search !== prevProps.history.location.search) { - // delete from state params the ones - this.validateParams(parseQueryParams(history.location.search)); - } + // Using location instead of history requires an extra click when + // using the back button to go back to previous location + if (history.location.search !== prevProps.history.location.search) { + // delete from state params the ones + this.validateParams(parseQueryParams(history.location.search)); } + } - updateParams = (params, paramsToBeRemoved = []) => { - const { history, location } = this.props; + updateParams = (params, paramsToBeRemoved = []) => { + const { history, location } = this.props; - const newParams = { - ...parseQueryParams(location.search), - ...params, - }; - if (paramsToBeRemoved.length !== 0) - paramsToBeRemoved.forEach((param) => { - delete newParams[param]; - }); - const queryString = createQueryParams(newParams); - history.push({ search: queryString }); + const newParams = { + ...parseQueryParams(location.search), + ...params, }; + if (paramsToBeRemoved.length !== 0) + paramsToBeRemoved.forEach((param) => { + delete newParams[param]; + }); + const queryString = createQueryParams(newParams); + history.push({ search: queryString }); + }; - errorMessage = (param, value) => `${param} ${value} is not valid`; + errorMessage = (param, value) => `${param} ${value} is not valid`; - findParam = (param, value, list, errors) => { - const valid = list.find((item) => item.name || item === value); + findParam = (param, value, list, errors) => { + const valid = list.find((item) => item.name || item === value); - if (valid === undefined) { - errors.push(this.errorMessage(param, value)); - } - return errors; - }; + if (valid === undefined) { + errors.push(this.errorMessage(param, value)); + } + return errors; + }; - async checkRevisions(params) { - if (!params.originalRevision) { - const newResultResponse = await this.verifyRevision( - params.newProject, - params.newRevision, - 'newResultSet', - ); - return this.setState({ - ...params, - ...newResultResponse, - validationComplete: true, - }); - } - const [newResultResponse, origResultResponse] = await Promise.all([ - this.verifyRevision( - params.newProject, - params.newRevision, - 'newResultSet', - ), - this.verifyRevision( - params.originalProject, - params.originalRevision, - 'originalResultSet', - ), - ]); - - this.setState({ + async checkRevisions(params) { + if (!params.originalRevision) { + const newResultResponse = await this.verifyRevision( + params.newProject, + params.newRevision, + 'newResultSet', + ); + return this.setState({ ...params, ...newResultResponse, - ...origResultResponse, validationComplete: true, }); } + const [newResultResponse, origResultResponse] = await Promise.all([ + this.verifyRevision( + params.newProject, + params.newRevision, + 'newResultSet', + ), + this.verifyRevision( + params.originalProject, + params.originalRevision, + 'originalResultSet', + ), + ]); + + this.setState({ + ...params, + ...newResultResponse, + ...origResultResponse, + validationComplete: true, + }); + } - async verifyRevision(project, revision, resultSetName) { - const { data, failureStatus } = await PushModel.getList({ - repo: project, - commit_revision: revision, - }); + async verifyRevision(project, revision, resultSetName) { + const { data, failureStatus } = await PushModel.getList({ + repo: project, + commit_revision: revision, + }); - if (failureStatus) { - return { - errorMessages: [`Error fetching revision ${revision}: ${data}`], - }; - } - if (!data.results.length) { - return { - errorMessages: [`No results found for revision ${revision}`], - }; + if (failureStatus) { + return { + errorMessages: [`Error fetching revision ${revision}: ${data}`], + }; + } + if (!data.results.length) { + return { + errorMessages: [`No results found for revision ${revision}`], + }; + } + + return { [resultSetName]: data.results[0] }; + } + + validateParams(params) { + const { projects, frameworks } = this.props; + let errors = []; + + for (const [param, value] of Object.entries(params)) { + if (!value && requiredParams.has(param)) { + errors.push(`${param} is required`); + continue; } - return { [resultSetName]: data.results[0] }; - } + if (value === 'undefined') { + errors.push(this.errorMessage(param, value)); + continue; + } - validateParams(params) { - const { projects, frameworks } = this.props; - let errors = []; - - for (const [param, value] of Object.entries(params)) { - if (!value && requiredParams.has(param)) { - errors.push(`${param} is required`); - continue; - } - - if (value === 'undefined') { - errors.push(this.errorMessage(param, value)); - continue; - } - - if (param.indexOf('Project') !== -1 && projects.length) { - errors = this.findParam(param, value, projects, errors); - } - - if (param === 'framework' && value && frameworks.length) { - errors = this.findParam(param, value, frameworks, errors); - } - - if (param === 'status' && value) { - errors = this.findParam( - param, - parseInt(value, 10), - Object.values(summaryStatusMap), - errors, - ); - } + if (param.indexOf('Project') !== -1 && projects.length) { + errors = this.findParam(param, value, projects, errors); } - if (errors.length) { - return this.setState({ errorMessages: errors }); + if (param === 'framework' && value && frameworks.length) { + errors = this.findParam(param, value, frameworks, errors); } - if (verifyRevisions) { - return this.checkRevisions(params); + + if (param === 'status' && value) { + errors = this.findParam( + param, + parseInt(value, 10), + Object.values(summaryStatusMap), + errors, + ); } - this.setState( - { - ...params, - validationComplete: true, - }, - this.updateParams({ ...params }), - ); } - render() { - const updateParams = { updateParams: this.updateParams }; - const removeParams = { removeParams: this.removeParams }; - const validatedProps = { - ...this.state, - ...updateParams, - ...removeParams, - }; - const { validationComplete, errorMessages } = this.state; - - return ( - - {!validationComplete && errorMessages.length === 0 && ( - - )} - - {errorMessages.length > 0 && ( - - - - )} - - {validationComplete && !errorMessages.length && ( - - )} - - ); + if (errors.length) { + return this.setState({ errorMessages: errors }); + } + if (verifyRevisions) { + return this.checkRevisions(params); } + this.setState( + { + ...params, + validationComplete: true, + }, + this.updateParams({ ...params }), + ); } - Validation.propTypes = { - location: PropTypes.shape({}).isRequired, - history: PropTypes.shape({}).isRequired, - }; + render() { + const updateParams = { updateParams: this.updateParams }; + const removeParams = { removeParams: this.removeParams }; + const validatedProps = { + ...this.state, + ...updateParams, + ...removeParams, + }; + const { validationComplete, errorMessages } = this.state; + + return ( + + {!validationComplete && errorMessages.length === 0 && ( + + )} + + {errorMessages.length > 0 && ( + + + + )} + + {validationComplete && !errorMessages.length && ( + + )} + + ); + } + } - return Validation; + Validation.propTypes = { + location: PropTypes.shape({}).isRequired, + history: PropTypes.shape({}).isRequired, }; + return Validation; +}; + export default withValidation; diff --git a/ui/perfherder/alerts/AlertModal.jsx b/ui/perfherder/alerts/AlertModal.jsx index 232c0108298..c587f3f6b9e 100644 --- a/ui/perfherder/alerts/AlertModal.jsx +++ b/ui/perfherder/alerts/AlertModal.jsx @@ -48,8 +48,14 @@ export default class AlertModal extends React.Component { }; render() { - const { showModal, toggle, updateAndClose, dropdownOption, header, title } = - this.props; + const { + showModal, + toggle, + updateAndClose, + dropdownOption, + header, + title, + } = this.props; const { inputValue, invalidInput, validated } = this.state; diff --git a/ui/perfherder/alerts/AlertStatusCountdown.jsx b/ui/perfherder/alerts/AlertStatusCountdown.jsx index 8178a54ae7b..6f677d70a4f 100644 --- a/ui/perfherder/alerts/AlertStatusCountdown.jsx +++ b/ui/perfherder/alerts/AlertStatusCountdown.jsx @@ -24,8 +24,10 @@ export default class AlertStatusCountdown extends React.Component { getDueDateCountdownsStatus() { const { alertSummary } = this.props; - let { triage_due_date: triageDueDate, bug_due_date: bugDueDate } = - alertSummary; + let { + triage_due_date: triageDueDate, + bug_due_date: bugDueDate, + } = alertSummary; const currentDate = new Date(Date.now()); triageDueDate = new Date(triageDueDate); diff --git a/ui/perfherder/alerts/AlertTable.jsx b/ui/perfherder/alerts/AlertTable.jsx index 705054c7e23..c4f12cb6a97 100644 --- a/ui/perfherder/alerts/AlertTable.jsx +++ b/ui/perfherder/alerts/AlertTable.jsx @@ -136,8 +136,11 @@ export default class AlertTable extends React.Component { }; filterAlert = (alert) => { - const { hideDownstream, hideAssignedToOthers, filterText } = - this.props.filters; + const { + hideDownstream, + hideAssignedToOthers, + filterText, + } = this.props.filters; const { username } = this.props.user; const { alertSummary } = this.state; @@ -195,8 +198,9 @@ export default class AlertTable extends React.Component { const filteredAlerts = alertSummary.alerts.filter((alert) => this.filterAlert(alert), ); - const filteredAndSortedAlerts = - this.getAlertsSortedByDefault(filteredAlerts); + const filteredAndSortedAlerts = this.getAlertsSortedByDefault( + filteredAlerts, + ); this.setState({ tableConfig, filteredAlerts, @@ -207,8 +211,11 @@ export default class AlertTable extends React.Component { }; updateAssignee = async (newAssigneeUsername) => { - const { updateAlertSummary, updateViewState, fetchAlertSummaries } = - this.props; + const { + updateAlertSummary, + updateViewState, + fetchAlertSummaries, + } = this.props; const { alertSummary } = this.state; const { data, failureStatus } = await updateAlertSummary(alertSummary.id, { diff --git a/ui/perfherder/alerts/Assignee.jsx b/ui/perfherder/alerts/Assignee.jsx index cde51335991..fdc3e7e3d92 100644 --- a/ui/perfherder/alerts/Assignee.jsx +++ b/ui/perfherder/alerts/Assignee.jsx @@ -97,8 +97,9 @@ export default class Assignee extends React.Component { const { user } = this.props; const { assigneeUsername, newAssigneeUsername, inEditMode } = this.state; - const { nickname, placeholder } = - this.extractNicknameAndPlaceholder(assigneeUsername); + const { nickname, placeholder } = this.extractNicknameAndPlaceholder( + assigneeUsername, + ); return !inEditMode ? ( diff --git a/ui/perfherder/compare/CompareSubtestDistributionView.jsx b/ui/perfherder/compare/CompareSubtestDistributionView.jsx index 50d3067d732..990ab4d4ccc 100644 --- a/ui/perfherder/compare/CompareSubtestDistributionView.jsx +++ b/ui/perfherder/compare/CompareSubtestDistributionView.jsx @@ -36,12 +36,16 @@ export default class CompareSubtestDistributionView extends React.Component { newProjectName, ); - const { testSuite, subtest, testName, platform } = - await this.fetchTestCharacteristics( - originalProjectName, - originalRevision, - originalSubtestSignature, - ); + const { + testSuite, + subtest, + testName, + platform, + } = await this.fetchTestCharacteristics( + originalProjectName, + originalRevision, + originalSubtestSignature, + ); this.setState({ filters: { testSuite, subtest }, testName, diff --git a/ui/perfherder/compare/CompareSubtestsView.jsx b/ui/perfherder/compare/CompareSubtestsView.jsx index 2d29d84c3ca..c8d473b08eb 100644 --- a/ui/perfherder/compare/CompareSubtestsView.jsx +++ b/ui/perfherder/compare/CompareSubtestsView.jsx @@ -67,8 +67,12 @@ class CompareSubtestsView extends React.PureComponent { }; createLinks = (oldResults, newResults, timeRange, framework) => { - const { originalProject, newProject, originalRevision, newRevision } = - this.props.validated; + const { + originalProject, + newProject, + originalRevision, + newRevision, + } = this.props.validated; let links = []; if ( diff --git a/ui/perfherder/compare/CompareTable.jsx b/ui/perfherder/compare/CompareTable.jsx index 0a307527c64..a2ebf2a10ac 100644 --- a/ui/perfherder/compare/CompareTable.jsx +++ b/ui/perfherder/compare/CompareTable.jsx @@ -73,8 +73,10 @@ export default class CompareTable extends React.Component { getBaseAndNewHeaders = (data) => { const [firstElementOfData] = data; - const { baseColumnMeasurementUnit, newColumnMeasurementUnit } = - firstElementOfData; + const { + baseColumnMeasurementUnit, + newColumnMeasurementUnit, + } = firstElementOfData; let baseName = 'Base'; let newName = 'New'; if (baseColumnMeasurementUnit && newColumnMeasurementUnit) { diff --git a/ui/perfherder/compare/CompareTableView.jsx b/ui/perfherder/compare/CompareTableView.jsx index f9d29888261..fea4440e24f 100644 --- a/ui/perfherder/compare/CompareTableView.jsx +++ b/ui/perfherder/compare/CompareTableView.jsx @@ -98,8 +98,12 @@ export default class CompareTableView extends React.Component { getPerformanceData = async () => { const { getQueryParams, hasSubtests, getDisplayResults } = this.props; - const { originalProject, originalRevision, newProject, newRevision } = - this.props.validated; + const { + originalProject, + originalRevision, + newProject, + newRevision, + } = this.props.validated; const { framework, timeRange, failureMessages } = this.state; this.setState({ loading: true }); diff --git a/ui/perfherder/compare/CompareView.jsx b/ui/perfherder/compare/CompareView.jsx index 6af457ff1f8..1e28c3ae449 100644 --- a/ui/perfherder/compare/CompareView.jsx +++ b/ui/perfherder/compare/CompareView.jsx @@ -83,8 +83,12 @@ class CompareView extends React.PureComponent { }; createLinks = (oldResults, newResults, timeRange, framework, app) => { - const { originalProject, newProject, originalRevision, newRevision } = - this.props.validated; + const { + originalProject, + newProject, + originalRevision, + newRevision, + } = this.props.validated; let links = []; const hasSubtests = diff --git a/ui/perfherder/compare/ReplicatesGraph.jsx b/ui/perfherder/compare/ReplicatesGraph.jsx index 348a6977e6e..2097a9329bc 100644 --- a/ui/perfherder/compare/ReplicatesGraph.jsx +++ b/ui/perfherder/compare/ReplicatesGraph.jsx @@ -47,8 +47,13 @@ export default class ReplicatesGraph extends React.Component { : `${title} replicates`; fetchReplicateGraphData = async () => { - const { project, revision, subtestSignature, getData, getReplicateData } = - this.props; + const { + project, + revision, + subtestSignature, + getData, + getReplicateData, + } = this.props; const replicateData = {}; const perfDatumResponse = await getData( diff --git a/ui/perfherder/compare/RetriggerModal.jsx b/ui/perfherder/compare/RetriggerModal.jsx index c694d5dbe9f..fedbb2f161f 100644 --- a/ui/perfherder/compare/RetriggerModal.jsx +++ b/ui/perfherder/compare/RetriggerModal.jsx @@ -43,8 +43,11 @@ export default class RetriggerModal extends React.Component { }; getInitialValue = (isBaseline = false) => { - const { defaultRetriggersValue, isBaseAggregate, currentRetriggerRow } = - this.props; + const { + defaultRetriggersValue, + isBaseAggregate, + currentRetriggerRow, + } = this.props; let initialValue = defaultRetriggersValue; if (isBaseline) { diff --git a/ui/perfherder/compare/SelectorCard.jsx b/ui/perfherder/compare/SelectorCard.jsx index 9265035c9b8..d5155545a94 100644 --- a/ui/perfherder/compare/SelectorCard.jsx +++ b/ui/perfherder/compare/SelectorCard.jsx @@ -111,8 +111,12 @@ export default class SelectorCard extends React.Component { }; validateInput = async (value) => { - const { updateState, revisionState, selectedRepo, getRevisions } = - this.props; + const { + updateState, + revisionState, + selectedRepo, + getRevisions, + } = this.props; const { data } = this.state; updateState({ @@ -172,8 +176,13 @@ export default class SelectorCard extends React.Component { validating, validated, } = this.state; - const { selectedRepo, projects, title, selectedRevision, missingRevision } = - this.props; + const { + selectedRepo, + projects, + title, + selectedRevision, + missingRevision, + } = this.props; return ( diff --git a/ui/perfherder/graphs/TableView.jsx b/ui/perfherder/graphs/TableView.jsx index 354bede2711..40fbbe85462 100644 --- a/ui/perfherder/graphs/TableView.jsx +++ b/ui/perfherder/graphs/TableView.jsx @@ -104,8 +104,13 @@ const TableView = ({ Cell: (props) => { let cellElem = null; if (props.original[dataKey]) { - const { value, jobsUrl, compareUrl, deltaValue, deltaPercent } = - props.original[dataKey]; + const { + value, + jobsUrl, + compareUrl, + deltaValue, + deltaPercent, + } = props.original[dataKey]; cellElem = (
    @@ -145,8 +150,13 @@ const TableView = ({ highlightedRevisions, dataKey, ) => { - const { pushUrl, jobsUrl, compareUrl, deltaValue, deltaPercent } = - getRevisionInfo(dataIndex, dataPoint, item); + const { + pushUrl, + jobsUrl, + compareUrl, + deltaValue, + deltaPercent, + } = getRevisionInfo(dataIndex, dataPoint, item); return { date: moment(dataPoint.x), diff --git a/ui/perfherder/perf-helpers/textualSummary.js b/ui/perfherder/perf-helpers/textualSummary.js index 0397f8df566..c26b0cb3233 100644 --- a/ui/perfherder/perf-helpers/textualSummary.js +++ b/ui/perfherder/perf-helpers/textualSummary.js @@ -160,8 +160,9 @@ export default class TextualSummary { ); const biggestTenRegressed = sortedRegressed.slice(0, 10); const smallestFiveRegressed = sortedRegressed.slice(-5); - const formattedBiggestRegressions = - this.formatAlertBulk(biggestTenRegressed); + const formattedBiggestRegressions = this.formatAlertBulk( + biggestTenRegressed, + ); const formattedSmallestRegressions = this.formatAlertBulk( smallestFiveRegressed, ); @@ -203,8 +204,9 @@ export default class TextualSummary { const formattedBiggestImprovements = this.formatAlertBulk( biggestFiveImprovements, ); - const formattedSmallestImprovement = - this.formatAlertBulk(smallestImprovement); + const formattedSmallestImprovement = this.formatAlertBulk( + smallestImprovement, + ); // Add a column for the profiler links if at least one alert has them. const maybeProfileColumn = this.hasProfileUrls diff --git a/ui/perfherder/tests/TestsTableControls.jsx b/ui/perfherder/tests/TestsTableControls.jsx index 2962d9ac25b..9840a94a8e3 100644 --- a/ui/perfherder/tests/TestsTableControls.jsx +++ b/ui/perfherder/tests/TestsTableControls.jsx @@ -57,8 +57,12 @@ export default class TestsTableControls extends React.Component { }; render() { - const { dropdownOptions, projectsMap, platformsMap, allFrameworks } = - this.props; + const { + dropdownOptions, + projectsMap, + platformsMap, + allFrameworks, + } = this.props; const { results } = this.state; let framework = false; if (dropdownOptions[0] !== undefined) diff --git a/ui/push-health/PlatformConfig.jsx b/ui/push-health/PlatformConfig.jsx index ee68ccbc264..86cf4315026 100644 --- a/ui/push-health/PlatformConfig.jsx +++ b/ui/push-health/PlatformConfig.jsx @@ -24,8 +24,13 @@ class PlatformConfig extends React.PureComponent { } componentDidMount() { - const { selectedJobName, selectedTaskId, jobs, jobName, testName } = - this.props; + const { + selectedJobName, + selectedTaskId, + jobs, + jobName, + testName, + } = this.props; this.setState({ detailsShowing: selectedJobName === `${testName} ${jobName}`, diff --git a/ui/push-health/Test.jsx b/ui/push-health/Test.jsx index c528beca2e7..78af12f7361 100644 --- a/ui/push-health/Test.jsx +++ b/ui/push-health/Test.jsx @@ -225,8 +225,11 @@ class Test extends PureComponent { selectedTaskId, updateParamsAndState, } = this.props; - const { clipboardVisible, detailsShowing, allPlatformsSelected } = - this.state; + const { + clipboardVisible, + detailsShowing, + allPlatformsSelected, + } = this.state; return (
    diff --git a/ui/push-health/details/DetailsPanel.jsx b/ui/push-health/details/DetailsPanel.jsx index 968603f7365..66dcc6d4af0 100644 --- a/ui/push-health/details/DetailsPanel.jsx +++ b/ui/push-health/details/DetailsPanel.jsx @@ -149,8 +149,12 @@ class DetailsPanel extends React.Component { render() { const { currentRepo, closeDetails } = this.props; - const { selectedTaskFull, taskDetails, taskDetailLoading, tabIndex } = - this.state; + const { + selectedTaskFull, + taskDetails, + taskDetailLoading, + tabIndex, + } = this.state; return (
    diff --git a/ui/shared/BugFiler.jsx b/ui/shared/BugFiler.jsx index fed99736b77..46c328d1266 100644 --- a/ui/shared/BugFiler.jsx +++ b/ui/shared/BugFiler.jsx @@ -670,8 +670,14 @@ export class BugFilerClass extends React.Component { } render() { - const { isOpen, toggle, suggestion, parsedLog, fullLog, reftestUrl } = - this.props; + const { + isOpen, + toggle, + suggestion, + parsedLog, + fullLog, + reftestUrl, + } = this.props; const { productSearch, suggestedProducts, diff --git a/ui/shared/HelpMenu.jsx b/ui/shared/HelpMenu.jsx index 7660ed17164..4964b23b587 100644 --- a/ui/shared/HelpMenu.jsx +++ b/ui/shared/HelpMenu.jsx @@ -37,7 +37,8 @@ const menuItems = [ text: 'API Reference', }, { - href: 'https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder', + href: + 'https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder', icon: faFileWord, text: 'Project Wiki', }, @@ -47,7 +48,8 @@ const menuItems = [ text: 'Mailing List', }, { - href: 'https://bugzilla.mozilla.org/enter_bug.cgi?product=Tree+Management&component=Treeherder', + href: + 'https://bugzilla.mozilla.org/enter_bug.cgi?product=Tree+Management&component=Treeherder', icon: faBug, text: 'Report a Bug', }, diff --git a/ui/shared/JobArtifacts.jsx b/ui/shared/JobArtifacts.jsx index 15534d5458f..bd8560507a1 100644 --- a/ui/shared/JobArtifacts.jsx +++ b/ui/shared/JobArtifacts.jsx @@ -20,8 +20,12 @@ export default class JobArtifacts extends React.PureComponent { } render() { - const { jobDetails, jobArtifactsLoading, repoName, selectedJob } = - this.props; + const { + jobDetails, + jobArtifactsLoading, + repoName, + selectedJob, + } = this.props; const sortedDetails = jobDetails.slice(); sortedDetails.sort((a, b) => { diff --git a/ui/shared/auth/AuthService.js b/ui/shared/auth/AuthService.js index 4ab0deb3cca..3c9cd54366b 100644 --- a/ui/shared/auth/AuthService.js +++ b/ui/shared/auth/AuthService.js @@ -15,6 +15,7 @@ export default class AuthService { _fetchUser(userSession) { const loginUrl = getApiUrl('/auth/login/'); + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { const userResponse = await fetch(loginUrl, { headers: { @@ -68,6 +69,7 @@ export default class AuthService { this.logout(); } + /* eslint-disable no-console */ console.error('Could not renew login:', err); } }