Skip to content

Commit 335593a

Browse files
committed
🧹
1 parent 011dc55 commit 335593a

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

site/.eslintrc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ rules:
9191
- allowSingleExtends: true
9292
"brace-style": "off"
9393
"curly": ["error", "all"]
94+
"eslint-comments/disable-enable-pair":
95+
- error
96+
- allowWholeFile: true
9497
"eslint-comments/require-description": "error"
9598
eqeqeq: error
9699
import/default: "off"

site/e2e/reporter.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console -- Logging is sort of the whole point here */
12
import * as fs from "fs";
23
import type {
34
FullConfig,
@@ -20,13 +21,11 @@ class CoderReporter implements Reporter {
2021

2122
onBegin(config: FullConfig, suite: Suite) {
2223
this.config = config;
23-
// eslint-disable-next-line no-console -- Helpful for debugging
2424
console.log(`==> Running ${suite.allTests().length} tests`);
2525
}
2626

2727
onTestBegin(test: TestCase) {
2828
this.testOutput.set(test.id, []);
29-
// eslint-disable-next-line no-console -- Helpful for debugging
3029
console.log(`==> Starting test ${test.title}`);
3130
}
3231

@@ -53,7 +52,7 @@ class CoderReporter implements Reporter {
5352
}
5453

5554
async onTestEnd(test: TestCase, result: TestResult) {
56-
console.log(`==> Finished test ${test.title}: ${result.status}`); // eslint-disable-line no-console -- Helpful for debugging
55+
console.log(`==> Finished test ${test.title}: ${result.status}`);
5756

5857
if (result.status === "passed") {
5958
this.passedCount++;
@@ -72,24 +71,22 @@ class CoderReporter implements Reporter {
7271
preserve === "always" ||
7372
(result.status !== "passed" && preserve !== "never");
7473
if (logOutput) {
75-
console.log("==> Output"); // eslint-disable-line no-console -- Debugging output
74+
console.log("==> Output");
7675
const output = this.testOutput.get(test.id)!;
7776
for (const [target, chunk] of output) {
7877
target.write(`${chunk.replace(/\n$/g, "")}\n`);
7978
}
8079

8180
if (result.errors.length > 0) {
82-
console.log("==> Errors"); // eslint-disable-line no-console -- Debugging output
81+
console.log("==> Errors");
8382
for (const error of result.errors) {
8483
reportError(error);
8584
}
8685
}
8786

8887
if (result.attachments.length > 0) {
89-
// eslint-disable-next-line no-console -- Debugging output
9088
console.log("==> Attachments");
9189
for (const attachment of result.attachments) {
92-
// eslint-disable-next-line no-console -- Debugging output
9390
console.log(attachment);
9491
}
9592
}
@@ -100,7 +97,6 @@ class CoderReporter implements Reporter {
10097
}
10198

10299
onEnd(result: FullResult) {
103-
// eslint-disable-next-line no-console -- Helpful for debugging
104100
console.log(`==> Tests ${result.status}`);
105101
console.log(`${this.passedCount} passed`);
106102
if (this.failedTests.length > 0) {
@@ -133,7 +129,6 @@ const exportDebugPprof = async (testName: string) => {
133129
if (err) {
134130
throw new Error(`Error writing to ${outputFile}: ${err.message}`);
135131
} else {
136-
// eslint-disable-next-line no-console -- Helpful for debugging
137132
console.log(`Data from ${url} has been saved to ${outputFile}`);
138133
}
139134
});
@@ -145,19 +140,15 @@ const exportDebugPprof = async (testName: string) => {
145140

146141
const reportError = (error: TestError) => {
147142
if (error.location) {
148-
// eslint-disable-next-line no-console -- Debugging output
149143
console.log(`${error.location.file}:${error.location.line}:`);
150144
}
151145
if (error.snippet) {
152-
// eslint-disable-next-line no-console -- Debugging output
153146
console.log(error.snippet);
154147
}
155148

156149
if (error.message) {
157-
// eslint-disable-next-line no-console -- Debugging output
158150
console.log(error.message);
159151
} else {
160-
// eslint-disable-next-line no-console -- Debugging output
161152
console.log(error);
162153
}
163154
};

0 commit comments

Comments
 (0)