Flagged example
import { useEffect, useState, useMemo } from 'react'
import { formatDate } from '../utils/dates'
export function Counter() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}
Why this trips
Deterministic AST match: flags imported bindings with zero references in the module.
Clean example
import { useState } from 'react'
export function Counter() {
const [count, setCount] = useState(0)
return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}
What changed
Delete bindings that no code references. Keep side-effect imports and real re-exports, but make those explicit so the reader can tell the import has a purpose.