angularjs-dom-mutation
Read-only mining codemod that detects direct DOM manipulation patterns in AngularJS source that block a clean migration to Angular's template/Renderer2 model, and emits dom_mutation metrics. No files are written to the target repo.
What it detects
pattern_kind | Detected via | Risk | Automation |
|---|---|---|---|
jquery | $(...) / jQuery(...) calls and $.xxx / jQuery.xxx member access | high | manual |
angular_element | angular.element(...) calls and element.xxx jqLite member access (link/directive element param) | high | partial |
document | document.xxx member access | medium | partial |
compile | $compile identifier usage (DI param, direct call, or member access target) | critical | manual |
native_dom | .querySelector, .getElementById, .innerHTML, .appendChild member access on any object | high | manual |
A single line can match more than one pattern (e.g. angular.element(document.body) reports both angular_element and document) — each is a distinct migration signal and is emitted as its own metric row.
Metrics
| Metric | Cardinalities |
|---|---|
dom_mutation | file, line, snippet, pattern_kind, migration_category (dom), risk, automation, effort_points, recommended_phase |
Installation
bash
Development
bash
License
MIT