Quick Fix

Code line with a lightbulb quick-fix tile and a dropdown of fix options. Preferred fix gets an amber tag.

const value = user.prfile.name;
  • Rename to 'profile'Preferred
  • Add missing property 'prfile'
  • Disable rule for this line

Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.

Import & use
import { Editor40 } from "@/components/beste/piece/editor40";

<Editor40
  line="const value = user.prfile.name;"
  actions={[
    {
      "label": "Rename to 'profile'",
      "preferred": true
    },
    {
      "label": "Add missing property 'prfile'"
    },
    {
      "label": "Disable rule for this line"
    }
  ]}
/>