I like to use
import { assert } from "ts-essentials";
Despite that import being present, the autofix of prefer-importing-vitest-globals adds a duplicate assert import from vitest.
I'm using the legacy eslint config, no typecheck — just in case any of the setup matters.