Skip to content

Commit 919d4e7

Browse files
authored
Replace file-level eslint-disable with per-line annotations (#64654)
1 parent 282eb9b commit 919d4e7

5 files changed

Lines changed: 8 additions & 13 deletions

File tree

airflow-core/src/airflow/ui/tests/e2e/fixtures/asset-data.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
/**
2121
* Asset data fixture — triggers asset_produces_1 DAG and waits for success.
2222
*/
23-
24-
/* eslint-disable react-hooks/rules-of-hooks -- Playwright's `use` is not a React Hook. */
2523
import { test as base } from "tests/e2e/fixtures";
2624
import {
27-
safeCleanupDagRun,
2825
apiTriggerDagRun,
26+
safeCleanupDagRun,
2927
waitForDagReady,
3028
waitForDagRunStatus,
3129
} from "tests/e2e/utils/test-helpers";
@@ -54,6 +52,7 @@ export const test = base.extend<Record<never, never>, { assetData: AssetData }>(
5452
timeout: 120_000,
5553
});
5654

55+
// eslint-disable-next-line react-hooks/rules-of-hooks
5756
await use({ dagId });
5857
} finally {
5958
if (createdRunId !== undefined) {

airflow-core/src/airflow/ui/tests/e2e/fixtures/audit-log-data.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
/**
2121
* Audit log data fixture — triggers DAG runs to generate audit log entries.
2222
*/
23-
24-
/* eslint-disable react-hooks/rules-of-hooks -- Playwright's `use` is not a React Hook. */
2523
import { testConfig } from "playwright.config";
2624
import { test as base } from "tests/e2e/fixtures";
2725
import {
28-
safeCleanupDagRun,
2926
apiTriggerDagRun,
27+
safeCleanupDagRun,
3028
waitForDagReady,
3129
waitForDagRunStatus,
3230
} from "tests/e2e/utils/test-helpers";
@@ -57,6 +55,7 @@ export const test = base.extend<Record<never, never>, { auditLogData: AuditLogDa
5755
});
5856
}
5957

58+
// eslint-disable-next-line react-hooks/rules-of-hooks
6059
await use({ dagId });
6160
} finally {
6261
for (const runId of createdRunIds) {

airflow-core/src/airflow/ui/tests/e2e/fixtures/dag-runs-data.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
/**
2121
* DAG Runs page data fixture — creates runs across two DAGs for filtering tests.
2222
*/
23-
24-
/* eslint-disable react-hooks/rules-of-hooks -- Playwright's `use` is not a React Hook. */
2523
import { testConfig } from "playwright.config";
2624
import { test as base } from "tests/e2e/fixtures";
2725
import {
2826
apiCreateDagRun,
29-
safeCleanupDagRun,
3027
apiSetDagRunState,
28+
safeCleanupDagRun,
3129
uniqueRunId,
3230
waitForDagReady,
3331
} from "tests/e2e/utils/test-helpers";
@@ -79,6 +77,7 @@ export const test = base.extend<Record<never, never>, { dagRunsPageData: DagRuns
7977
});
8078
createdRuns.push({ dagId: dag2Id, runId: runId3 });
8179

80+
// eslint-disable-next-line react-hooks/rules-of-hooks
8281
await use({ dag1Id, dag2Id });
8382
} finally {
8483
for (const { dagId, runId } of createdRuns) {

airflow-core/src/airflow/ui/tests/e2e/fixtures/task-instances-data.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
/**
2121
* Task instances data fixture — creates runs with success/failed task instances.
2222
*/
23-
24-
/* eslint-disable react-hooks/rules-of-hooks -- Playwright's `use` is not a React Hook. */
2523
import { expect, type APIRequestContext } from "@playwright/test";
2624
import { testConfig } from "playwright.config";
2725
import { test as base } from "tests/e2e/fixtures";
@@ -100,6 +98,7 @@ export const test = base.extend<Record<never, never>, { taskInstancesData: TaskI
10098
createdRunIds.push(runId2);
10199
await setAllTaskInstanceStates(authenticatedRequest, { dagId, runId: runId2, state: "failed" });
102100

101+
// eslint-disable-next-line react-hooks/rules-of-hooks
103102
await use({ dagId });
104103
} finally {
105104
for (const runId of createdRunIds) {

airflow-core/src/airflow/ui/tests/e2e/fixtures/xcom-data.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
/**
2121
* XCom data fixture — triggers example_xcom DAG runs to generate XCom entries.
2222
*/
23-
24-
/* eslint-disable react-hooks/rules-of-hooks -- Playwright's `use` is not a React Hook. */
2523
import { testConfig } from "playwright.config";
2624
import { test as base } from "tests/e2e/fixtures";
2725
import {
@@ -67,6 +65,7 @@ export const test = base.extend<Record<never, never>, { xcomRunsData: XcomRunsDa
6765
});
6866
}
6967

68+
// eslint-disable-next-line react-hooks/rules-of-hooks
7069
await use({ dagId, xcomKey: "return_value" });
7170
} finally {
7271
for (const runId of createdRunIds) {

0 commit comments

Comments
 (0)