Skip to content

Fix #6: finalize docs and production usage examples - #13

Merged
sam-parsons merged 1 commit into
mainfrom
feature/6-finalize-docs-and-usage-examples
Apr 26, 2026
Merged

sam-parsons merged 1 commit into
mainfrom
feature/6-finalize-docs-and-usage-examples

Conversation

@sam-parsons

Copy link
Copy Markdown
Owner

Summary

  • Replace README planning notes with implementation-accurate documentation for current plugin behavior.
  • Add a complete options reference (functions, debugger, labels, chainedCalls) plus copy-paste production usage.
  • Document safe-removal vs chained/non-statement behavior with clear skip|warn|error outcomes.

Issues

How to test

  • npm run check
  • npm run build

Notes


Learning notes

Conservative stripping as an operational safety choice

What it is
When a transformation cannot prove a removal is behavior-preserving, it should prefer explicit policy over best-guess mutation.

Where it appears in this PR
The README now mirrors the plugin's call-line analysis behavior by distinguishing whole-statement removals from chained/non-statement matches and mapping those to chainedCalls policies.

Why it was the right call here
An aggressive strip strategy could remove code that still contributes runtime behavior (for example, chained expressions). The chosen approach keeps removals deterministic and safe by default (skip), while allowing teams to raise strictness (warn or error) as part of CI policy.

Document the implemented strip behavior with production-focused configuration examples and explicit chained-call outcomes so users can adopt the plugin safely.
@sam-parsons
sam-parsons merged commit 1b0cacd into main Apr 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue F: Finalize docs and production usage examples

1 participant