Some lint errors are not about style. They happen when server UI, client UI, service code, or shared utilities are mixed in the wrong place. Use the examples below as the default shape: keep server pages simple, move browser interaction into client components, and wrap external tools behind internal modules.
Client hooks in a server file
This happens when a server page or server-oriented component imports useState, useEffect, useMemo, useRef, or another React client hook.
Adding use client to a server file
Do not turn a whole page into a client component just because one small part needs browser interaction.
Passing function props from server UI
Server components should pass data, not event behavior. Move callbacks such as onClick into a client component.
Importing external packages directly
Convention files should not depend on random external packages directly. Put the dependency behind an internal util or library file first.
Using JavaScript private methods
In service classes, use TypeScript private methods with an underscore name instead of JavaScript #private methods. Other classes can use #private methods.
Allowed exceptions exist for some framework patterns, but when you are writing ordinary app code, prefer the After shape first. If console output is intentional, use console.info, console.warn, or console.error instead of console.log.