enforce-file-structure
Require imports before body statements and require use server to be the first statement.
Why
Interleaved imports obscure module dependencies, while a displaced use server string is not an active directive.
Fix
Move use server to the first statement when present, then place imports before declarations and executable statements.
Examples
export const x = 1;import { z } from "zod";import { z } from "zod";export const schema = z.string();