Commit d62b8f1
fix(lint): sample axis-aligned connectors and gate decorative strokes
Empirical testing of this rule found four blind spots and two false positives.
All six are closed here; every real detachment in the fixture set still fires
and the five registry examples produce byte-identical findings.
Blind spots:
- An SVG shape's client rect excludes its stroke, so a single-segment
horizontal or vertical `<line>`/`<path>` measures 0 on one axis and
`isVisibleElement` dropped it before sampling — the plain A-to-B same-row
edge was never checked. The rect gate is now stroke-aware, limited to SVG
geometry via `getBBox`.
- `<polyline>` elbows were not in the candidate selector at all.
- `CONNECTOR_INDICATOR_NAME` was unbounded, so `pointer-events-none` on an
ancestor `<svg>` — the standard Tailwind overlay idiom — reclassified every
connector beneath it as a gauge indicator and muted the whole subtree.
`sticky`, `ticker` and `sticky-header` matched `tick` the same way. Note a
`\b`-only fix does not work: `-` is itself a word boundary.
False positives: the rule had no connector-naming gate, unlike its static
sibling, so any stroke whose end happened to land inside a text card read as a
half-attached connector — a decorative accent line and a divider rule both
flagged. It now requires `isConnectorPath`, with camelCase tolerated so ids
like `edgeBC` still read as connectors.
Still open, unchanged by this commit: id-less connectors sharing one selector
are dropped as ambiguous, detachments confined to the first 45% are outside the
hold window, and only endpoints are measured, so a long curve's bulge can hang
in empty space unseen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent c1e50ae commit d62b8f1
1 file changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
| |||
1271 | 1273 | | |
1272 | 1274 | | |
1273 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1274 | 1286 | | |
1275 | 1287 | | |
1276 | 1288 | | |
| |||
1744 | 1756 | | |
1745 | 1757 | | |
1746 | 1758 | | |
1747 | | - | |
| 1759 | + | |
| 1760 | + | |
1748 | 1761 | | |
1749 | 1762 | | |
1750 | 1763 | | |
| |||
1884 | 1897 | | |
1885 | 1898 | | |
1886 | 1899 | | |
1887 | | - | |
| 1900 | + | |
1888 | 1901 | | |
| 1902 | + | |
1889 | 1903 | | |
1890 | 1904 | | |
| 1905 | + | |
1891 | 1906 | | |
1892 | 1907 | | |
1893 | 1908 | | |
| |||
0 commit comments