@noctcore/eslint-plugin-llm
A bad fit if you call models through your own wrapper everywhere, because the rule recognises the SDKs' own response shapes and will not see through the wrapper.
LLM output treated as untrusted input: model text kept out of eval, shells, raw SQL, HTML, fetch origins and fs paths.
What it solves
Section titled “What it solves”A model writes what its prompt steers it toward, and the prompt carries the user’s message, retrieved documents and tool results along with your instructions. A prompt injection in any of them comes back out as model output. Sent to innerHTML it is XSS, to exec it is code execution, to $queryRawUnsafe it is SQL injection. This is OWASP LLM05, Improper Output Handling.
What it will yell at you about
Section titled “What it will yell at you about”It will yell at you about the result of an OpenAI, Anthropic or Vercel AI SDK call reaching a dangerous sink in the same function, with nothing in between that validates or sanitizes it. It follows const bindings and destructuring, not function calls, so it stays silent whenever the chain is not visible in the source. It is a bad fit if you call models through your own wrapper everywhere, because the rule recognises the SDKs’ own response shapes and will not see through the wrapper.
Install and configure
Section titled “Install and configure”npm install --save-dev @noctcore/eslint-plugin-llm @typescript-eslint/parser# or: bun add -D / pnpm add -D @noctcore/eslint-plugin-llm @typescript-eslint/parserThe recommended preset enables 1 of 1 rule. The rules board below builds the flat config: start from a preset, switch single rules between error and off, and copy the result.
Each rule links to its page, with the options it takes and Incorrect and Correct examples. Start with
no-llm-output-to-sink.
--fixsuggestionsneeds optionstype infoEach switch sets a rule to error or off.
eval, a shell, raw SQL, HTML injection, a fetch origin or an fs path in the same function without being validated or sanitized first.