Commit 71ea488
committed
fix(playwright): scope the guardrail rules to TypeScript and enforce it
The playwright rule globs were inherited as {js,jsx,ts,tsx}. Nothing in the
corpus is JavaScript — all 245 baselined files are .ts — but the glob pulled
in the new CommonJS plugin under eslint-rules/, applying test rules like
no-positional-locator to the linter's own source. That is also why the CI
bypass-guard grep had to be restricted to .ts/.tsx: the plugin's RuleTester
fixtures contain literal eslint-disable strings it would match.
Narrow the four rule globs to {ts,tsx}. The plugin keeps its own CommonJS
block, so its source is still linted, just not as a Playwright test. The
suppressions baseline is byte-identical.
Scoping alone would trade one gap for another: Playwright's default
testMatch collects *.spec.js, so a JavaScript spec would run with no rules
applied at all. Verified directly — a planted .spec.js is collected as
'[chromium] > Features/__ExtCheck.spec.js'. So the TypeScript-only property
the scoping relies on is now asserted in corpus.test.js rather than assumed,
and fails with the offending paths if a .js/.jsx ever lands in the corpus.1 parent f4838be commit 71ea488
2 files changed
Lines changed: 50 additions & 4 deletions
File tree
- openmetadata-ui/src/main/resources/ui
- playwright/eslint-rules/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
| 567 | + | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments