{
  "targetDir": "./fixtures/legacy-textarea.html",
  "totalFindings": 1,
  "guides": [
    {
      "guideId": "form-fields-automatically-fit-contents",
      "retrieveCommand": "npx modern-web-guidance retrieve form-fields-automatically-fit-contents",
      "count": 1,
      "rules": [
        {
          "ruleId": "form-fields-automatically-fit-contents",
          "summary": "Imperative JavaScript auto-resizing of textareas and inputs using scrollHeight or autosize() should be replaced with CSS field-sizing: content.",
          "verifierRubric": {
            "keepWhen": [
              "A keyup, input, change, or keydown event listener dynamically recalculates a textarea or text input height/width using scrollHeight or scrollWidth to auto-expand the field as the user types.",
              "A helper function resets .style.height to \"auto\", \"0px\", or \"1px\" and sets it to scrollHeight to fit contents.",
              "The application invokes the autosize() library on a textarea or input collection."
            ],
            "dropWhen": [
              "The code is guarded by a feature query checking CSS.supports(\"field-sizing\", \"content\") or field-sizing support.",
              "The scrollHeight measurement calculates scrollbar thumb sizes, virtual scroll windowing, or scroll progress in a long document/dialog.",
              "The element being resized is a canvas, iframe, or modal container rather than a form input or textarea."
            ]
          },
          "count": 1,
          "findings": [
            {
              "file": "fixtures/legacy-textarea.html",
              "line": 5,
              "message": "JavaScript dynamic scrollHeight calculation resizes form field; replace with declarative CSS field-sizing: content.",
              "lineContent": "textarea.style.height = textarea.scrollHeight + 'px';"
            }
          ]
        }
      ]
    }
  ],
  "activeRuleCount": 35,
  "activeGuideCount": 33,
  "note": "Checked 33 guides (35 deterministic rules; ~20% of the guidance corpus). Finding 1 item here only reflects deterministic legacy patterns; use 'search <topic>' for the rest of the catalog."
}
