Skip to content

Commit 7021e2e

Browse files
fix: use eslint-ignore comments instead of modifying eslint configuration
Co-Authored-By: Connor Prussin <[email protected]>
1 parent 47b056d commit 7021e2e

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

apps/hermes/client/js/.eslintrc.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@ module.exports = {
33
parser: "@typescript-eslint/parser",
44
plugins: ["@typescript-eslint"],
55
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6-
rules: {
7-
"@typescript-eslint/no-unused-vars": [
8-
"warn",
9-
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
10-
],
11-
},
126
};

apps/hermes/client/js/src/examples/HermesClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ async function run() {
8989

9090
eventSource.onmessage = (event: MessageEvent<string>) => {
9191
console.log("Received price update:", event.data);
92-
// Variable intentionally unused, prefixed with underscore
93-
const _priceUpdate = JSON.parse(event.data) as PriceUpdate;
92+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
93+
const priceUpdate = JSON.parse(event.data) as PriceUpdate;
9494
};
9595

9696
eventSource.onerror = (error: Event) => {

price_service/client/js/src/__tests__/connection.e2e.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,11 @@ describe("Test websocket endpoints", () => {
218218
await sleep(20000);
219219
connection.closeWebSocket();
220220

221-
let seenOutOfOrder = false;
221+
// Check for out of order slots but don't assert on it since it's not stable
222222
for (let i = 1; i < observedSlots.length; i++) {
223223
if (observedSlots[i] < observedSlots[i - 1]) {
224-
seenOutOfOrder = true;
224+
// Out of order slot found, but we don't assert on it
225+
break;
225226
}
226227
}
227228

price_service/sdk/js/.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ module.exports = {
55
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
66
rules: {
77
"@typescript-eslint/no-explicit-any": "off",
8-
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }]
98
},
109
};

price_service/sdk/js/src/__tests__/AccumulatorUpdateData.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const TEST_ACCUMULATOR_UPDATE_DATA =
1111

1212
describe("Test parse accumulator update", () => {
1313
test("Happy path", async () => {
14-
const { vaa: _vaa, updates } = parseAccumulatorUpdateData(
14+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
15+
const { vaa, updates } = parseAccumulatorUpdateData(
1516
Buffer.from(TEST_ACCUMULATOR_UPDATE_DATA, "base64")
1617
);
1718

@@ -73,7 +74,8 @@ describe("Test parse accumulator update", () => {
7374
).updates.length
7475
).toBe(3);
7576

76-
const { vaa: _vaa, updates } = parseAccumulatorUpdateData(
77+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
78+
const { vaa, updates } = parseAccumulatorUpdateData(
7779
sliceAccumulatorUpdateData(
7880
Buffer.from(TEST_ACCUMULATOR_UPDATE_DATA, "base64"),
7981
1,

0 commit comments

Comments
 (0)