mirror of
https://github.com/apache/superset.git
synced 2026-05-21 15:55:10 +00:00
oxlint's `no-use-before-define` rejects function-declaration hoisting: `redirect()` calls `navigateTo()` declared further down in the file, and the rule fires on the call site even though the runtime ordering is sound. Moves `navigateTo` and `navigateWithState` to the top of the module (directly after imports) and removes the corresponding "Legacy multi-mode helpers" section that previously held them at the bottom. The channel-3 section now follows and can reference the primitives in textual order. Section comment updated to explain the placement. Also extracts the long template-literal expression in `getShareableUrl` into a `safePath` local so the line fits under prettier's print width. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>