Skip to content

fix: load the pane module by passing $ only into function declarations - #25

Merged
GuiMoraesDev merged 2 commits into
mainfrom
fix/pane-module-load
Oct 21, 2026
Merged

GuiMoraesDev merged 2 commits into
mainfrom
fix/pane-module-load

Conversation

@GuiMoraesDev

@GuiMoraesDev GuiMoraesDev commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

What changes

The Taskflow pane never loaded: the engine refused the hooks module because closeSettings and editSettings in panel/data/settings.ts were exported arrow functions receiving $, and the engine follows $ across an import only into function declarations. Both are now function declarations, the pane's command is renamed to /open-mod, and an ESLint no-restricted-syntax rule rejects an exported arrow or function expression whose first parameter is $.

Acceptance criteria

  • Given the plugin source, when npm run lint runs, it exits 0
  • Given an exported arrow helper taking $, npm run check and the pre-commit hook fail — the lint rule, seen failing on both helpers before the fix
  • Given the plugin loaded, /open-mod opens the Taskflow pane — owner check after reload
  • /taskflow no longer exists (owner check after reload); the README names /open-mod ✔

Agreed behaviour

  • The pane opens with /open-mod; /taskflow is no longer a command.
  • An exported helper that takes $ is written as a function declaration; lint enforces it.

Verification

npm run lint exited 1 on settings.ts:65 and :67 before the fix and exits 0 after; format check, typecheck and version check pass.

The engine follows $ across an import only into function declarations,
so the exported arrow helpers closeSettings and editSettings made it
refuse the hooks module. A lint rule now rejects that shape.
@GuiMoraesDev GuiMoraesDev added the bug Something isn't working label Oct 21, 2026
@GuiMoraesDev GuiMoraesDev self-assigned this Oct 21, 2026
@GuiMoraesDev
GuiMoraesDev marked this pull request as ready for review October 21, 2026 18:17
@GuiMoraesDev
GuiMoraesDev merged commit 6f5418e into main Oct 21, 2026
1 check passed
@GuiMoraesDev
GuiMoraesDev deleted the fix/pane-module-load branch October 21, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant