Skip to content

Commit 96aced1

Browse files
committed
Run automatic linting
1 parent 78170ff commit 96aced1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+345
-649
lines changed

tests/ui/job-view/Filtering_test.jsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,8 @@ describe('Filtering', () => {
468468
});
469469

470470
test('Filters | Reset should get back to original set of jobs', async () => {
471-
const {
472-
getAllByText,
473-
findAllByText,
474-
findByText,
475-
queryAllByText,
476-
} = render(testApp());
471+
const { getAllByText, findAllByText, findByText, queryAllByText } =
472+
render(testApp());
477473
const symbolToRemove = 'yaml';
478474

479475
await findAllByText('B');

tests/ui/job-view/Push_test.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ describe('Transformations', () => {
7171
expected: 'devtools/client/framework/browser-toolbox/test/browser.ini',
7272
},
7373
{
74-
path:
75-
'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js',
74+
path: 'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js',
7675
expected:
7776
'devtools/client/framework/browser-toolbox/test/browser_browser_toolbox.js',
7877
},

tests/ui/job-view/details/PinBoard_test.jsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,8 @@ describe('DetailsPanel', () => {
262262
});
263263

264264
test('classify and unclassify all jobs', async () => {
265-
const {
266-
getByPlaceholderText,
267-
getByText,
268-
getByTitle,
269-
queryAllByTitle,
270-
} = render(testDetailsPanel());
265+
const { getByPlaceholderText, getByText, getByTitle, queryAllByTitle } =
266+
render(testDetailsPanel());
271267

272268
store.dispatch(pinJobs(jobList.data));
273269
store.dispatch(setSelectedJob(jobList.data[1], true));

tests/ui/perfherder/alerts-view/alerts_test.jsx

+12-30
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,8 @@ test("'Take' button hides when clicking on 'Unassigned' badge", async () => {
467467
alertSummary.assignee_email = '[email protected]';
468468
alertSummary.assignee_username = 'mozilla-ldap/[email protected]';
469469

470-
const {
471-
getByText,
472-
queryByText,
473-
queryByPlaceholderText,
474-
} = alertsViewControls();
470+
const { getByText, queryByText, queryByPlaceholderText } =
471+
alertsViewControls();
475472

476473
const unassignedBadge = await waitFor(() => getByText('Unassigned'));
477474

@@ -659,11 +656,8 @@ const assertAlertsAreInOrder = async (alertsInOrder, alertTableRows) => {
659656
};
660657

661658
test(`table data can be sorted in descending order by 'Test'`, async () => {
662-
const {
663-
getAllByLabelText,
664-
getByTestId,
665-
getAllByTitle,
666-
} = alertsViewControls();
659+
const { getAllByLabelText, getByTestId, getAllByTitle } =
660+
alertsViewControls();
667661

668662
let alertTableRows = await waitFor(() =>
669663
getAllByLabelText('Alert table row'),
@@ -698,11 +692,8 @@ test(`table data can be sorted in descending order by 'Test'`, async () => {
698692
});
699693

700694
test(`table data can be sorted in ascending order by 'Platform'`, async () => {
701-
const {
702-
getByTestId,
703-
getAllByLabelText,
704-
getAllByTitle,
705-
} = alertsViewControls();
695+
const { getByTestId, getAllByLabelText, getAllByTitle } =
696+
alertsViewControls();
706697

707698
let alertTableRows = await waitFor(() =>
708699
getAllByLabelText('Alert table row'),
@@ -744,11 +735,8 @@ test(`table data cannot be sorted by 'Tags & Options'`, async () => {
744735
});
745736

746737
test(`table data can be sorted in ascending order by 'Confidence'`, async () => {
747-
const {
748-
getAllByLabelText,
749-
getByTestId,
750-
getAllByTitle,
751-
} = alertsViewControls();
738+
const { getAllByLabelText, getByTestId, getAllByTitle } =
739+
alertsViewControls();
752740

753741
let alertTableRows = await waitFor(() =>
754742
getAllByLabelText('Alert table row'),
@@ -780,11 +768,8 @@ test(`table data can be sorted in ascending order by 'Confidence'`, async () =>
780768
});
781769

782770
test(`table data can be sorted in ascending order by 'Magnitude of Change'`, async () => {
783-
const {
784-
getAllByLabelText,
785-
getByTestId,
786-
getAllByTitle,
787-
} = alertsViewControls();
771+
const { getAllByLabelText, getByTestId, getAllByTitle } =
772+
alertsViewControls();
788773

789774
let alertTableRows = await waitFor(() =>
790775
getAllByLabelText('Alert table row'),
@@ -817,11 +802,8 @@ test(`table data can be sorted in ascending order by 'Magnitude of Change'`, asy
817802
});
818803

819804
test('Data can be sorted only by one column', async () => {
820-
const {
821-
getAllByLabelText,
822-
getByTestId,
823-
getAllByTitle,
824-
} = alertsViewControls();
805+
const { getAllByLabelText, getByTestId, getAllByTitle } =
806+
alertsViewControls();
825807

826808
let alertTableRows = await waitFor(() =>
827809
getAllByLabelText('Alert table row'),

tests/ui/perfherder/compare-view/compare_table_test.jsx

+4-8
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,8 @@ test('filters that are not enabled are removed from URL params', async () => {
343343
});
344344

345345
test('page parameter updates with value 2 when clicking on the second page', async () => {
346-
const { getByText, findAllByLabelText } = compareTableControls(
347-
compareResults,
348-
);
346+
const { getByText, findAllByLabelText } =
347+
compareTableControls(compareResults);
349348

350349
const result1 = await waitFor(() =>
351350
getByText(compareTablesControlsResults[0].name),
@@ -374,11 +373,8 @@ test('page parameter updates with value 2 when clicking on the second page', asy
374373
});
375374

376375
test('text input filter results should differ when filter button(s) are selected', async () => {
377-
const {
378-
getByText,
379-
getByPlaceholderText,
380-
queryByText,
381-
} = compareTableControls();
376+
const { getByText, getByPlaceholderText, queryByText } =
377+
compareTableControls();
382378

383379
const result1 = await waitFor(() => getByText(result[0].name));
384380
const result2 = await waitFor(() => getByText(result[1].name));

tests/ui/perfherder/graphs-view/graphs_view_test.jsx

+4-12
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,8 @@ test('Using select query param displays tooltip for correct datapoint with repli
278278
});
279279

280280
test('InputFilter from TestDataModal can filter by application name', async () => {
281-
const {
282-
getByText,
283-
getByTestId,
284-
getByPlaceholderText,
285-
getByTitle,
286-
} = graphsViewControls();
281+
const { getByText, getByTestId, getByPlaceholderText, getByTitle } =
282+
graphsViewControls();
287283

288284
const { name, application, projectName, platform } = seriesData[0];
289285
const fullTestName = projectName.concat(
@@ -313,12 +309,8 @@ test('InputFilter from TestDataModal can filter by application name', async () =
313309

314310
test('Changing the platform dropdown while filtered by text in the Test Data Modal displays expected tests', async () => {
315311
mockShowModal.mockClear();
316-
const {
317-
getByText,
318-
getByPlaceholderText,
319-
getByTitle,
320-
getByTestId,
321-
} = graphsViewControls();
312+
const { getByText, getByPlaceholderText, getByTitle, getByTestId } =
313+
graphsViewControls();
322314

323315
fireEvent.click(getByText('Add test data'));
324316

tests/ui/perfherder/replicates_graph_test.jsx

+12-90
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,8 @@ const mockedReplicateData = {
2323
lowerIsBetter: true,
2424
name: SUBTEST_NAME,
2525
replicates: [
26-
500,
27-
345,
28-
366,
29-
358,
30-
355,
31-
365,
32-
354,
33-
354,
34-
363,
35-
360,
36-
389,
37-
357,
38-
273,
39-
376,
40-
350,
41-
381,
42-
373,
43-
356,
44-
351,
45-
348,
46-
271,
47-
354,
48-
351,
49-
360,
50-
385,
26+
500, 345, 366, 358, 355, 365, 354, 354, 363, 360, 389, 357, 273,
27+
376, 350, 381, 373, 356, 351, 348, 271, 354, 351, 360, 385,
5128
],
5229
shouldAlert: false,
5330
unit: 'ms',
@@ -58,31 +35,8 @@ const mockedReplicateData = {
5835
lowerIsBetter: true,
5936
name: 'tablemutation.html',
6037
replicates: [
61-
89,
62-
88,
63-
90,
64-
83,
65-
87,
66-
87,
67-
88,
68-
86,
69-
85,
70-
84,
71-
85,
72-
88,
73-
102,
74-
83,
75-
100,
76-
86,
77-
100,
78-
80,
79-
87,
80-
88,
81-
82,
82-
85,
83-
84,
84-
83,
85-
86,
38+
89, 88, 90, 83, 87, 87, 88, 86, 85, 84, 85, 88, 102, 83, 100, 86,
39+
100, 80, 87, 88, 82, 85, 84, 83, 86,
8640
],
8741
shouldAlert: false,
8842
unit: 'ms',
@@ -98,26 +52,8 @@ const mockedReplicateData = {
9852
{
9953
name: 'ts_paint',
10054
replicates: [
101-
844,
102-
832,
103-
842,
104-
825,
105-
849,
106-
816,
107-
857,
108-
841,
109-
849,
110-
840,
111-
846,
112-
872,
113-
864,
114-
837,
115-
830,
116-
843,
117-
841,
118-
854,
119-
841,
120-
858,
55+
844, 832, 842, 825, 849, 816, 857, 841, 849, 840, 846, 872, 864,
56+
837, 830, 843, 841, 854, 841, 858,
12157
],
12258
value: 842,
12359
},
@@ -134,26 +70,12 @@ const mockedReplicateData = {
13470
lowerIsBetter: true,
13571
name: '',
13672
replicates: [
137-
552.9000000000001,
138-
561.6599999999999,
139-
558.1199999999999,
140-
565.0799999999999,
141-
554.94,
142-
599.9399999999998,
143-
600.9200000000001,
144-
559.22,
145-
552.0600000000002,
146-
559.4000000000001,
147-
603.0999999999999,
148-
586.4199999999998,
149-
587.3200000000002,
150-
606.3800000000001,
151-
587.1000000000001,
152-
592.9200000000001,
153-
542.9199999999998,
154-
553.98,
155-
556.4200000000001,
156-
576.0999999999999,
73+
552.9000000000001, 561.6599999999999, 558.1199999999999,
74+
565.0799999999999, 554.94, 599.9399999999998, 600.9200000000001,
75+
559.22, 552.0600000000002, 559.4000000000001, 603.0999999999999,
76+
586.4199999999998, 587.3200000000002, 606.3800000000001,
77+
587.1000000000001, 592.9200000000001, 542.9199999999998, 553.98,
78+
556.4200000000001, 576.0999999999999,
15779
],
15880
shouldAlert: false,
15981
unit: 'ms',

tests/ui/push-health/details/DetailsPanel_test.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ describe('DetailsPanel', () => {
6565
},
6666
line_number: 18841,
6767
},
68-
line:
69-
'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',
68+
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',
7069
line_number: 18841,
7170
},
7271
],

ui/helpers/job.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ export const getTaskRunStr = (job) => `${job.task_id}.${job.retry_id}`;
237237

238238
// This matches as taskId, optionally followed by `.` or`-` and a runId.
239239
// We support `-` for backwards compatability with the original format used.
240-
const taskRunPattern = /^([A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw])(?:[-.]([0-9]+))?$/;
240+
const taskRunPattern =
241+
/^([A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw])(?:[-.]([0-9]+))?$/;
241242

242243
export const getTaskRun = function getTaskRun(taskRunStr) {
243244
const match = taskRunPattern.exec(taskRunStr);

ui/helpers/performance.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// This file may export additional functions.
2-
/* eslint-disable import/prefer-default-export */
32

43
import TaskclusterModel from '../models/taskcluster';
54

ui/helpers/revision.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const getRevisionTitle = function getRevisionTitle(revisions) {
2424
* Strip out unwanted things like additional lines, trychooser
2525
* syntax, request flags, mq cruft, whitespace, and punctuation
2626
*/
27-
// eslint-disable-next-line prefer-destructuring
27+
2828
title = title.split('\n')[0];
2929
title = title.replace(/\btry: .*/, '');
3030
title = title.replace(/\b(r|sr|f|a)=.*/, '');

ui/helpers/sort.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line import/prefer-default-export
21
export const sortAlphaNum = (a, b) => {
32
// Implement a better alphanumeric sort so that mochitest-10
43
// is sorted after mochitest 9, not mochitest-1

ui/helpers/taskcluster.js

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ const taskcluster = (() => {
8080
userCredentials[_rootUrl] &&
8181
moment(userCredentials[_rootUrl].expires).isAfter(moment())
8282
) {
83-
// eslint-disable-next-line no-promise-executor-return
8483
return resolve(userCredentials[_rootUrl]);
8584
}
8685

ui/helpers/utils.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-bitwise */
2-
31
export const hashFunction = (someString) => {
42
// Borrowed from https://github.com/darkskyapp/string-hash
53
let hash = 5381;

ui/infra-compare/InfraCompareTableView.jsx

+4-13
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ export default class InfraCompareTableView extends React.Component {
6666

6767
getInfraData = async () => {
6868
const { getQueryParams, getDisplayResults } = this.props;
69-
const {
70-
originalProject,
71-
originalRevision,
72-
newProject,
73-
newRevision,
74-
} = this.props.validated;
69+
const { originalProject, originalRevision, newProject, newRevision } =
70+
this.props.validated;
7571
const { timeRange, failureMessages } = this.state;
7672

7773
this.setState({ loading: true });
@@ -143,13 +139,8 @@ export default class InfraCompareTableView extends React.Component {
143139
pageTitle,
144140
} = this.props.validated;
145141
const { jobsNotDisplayed } = this.props;
146-
const {
147-
compareResults,
148-
loading,
149-
failureMessages,
150-
timeRange,
151-
tabTitle,
152-
} = this.state;
142+
const { compareResults, loading, failureMessages, timeRange, tabTitle } =
143+
this.state;
153144
const compareDropdowns = [];
154145
const params = {
155146
originalProject,

0 commit comments

Comments
 (0)