new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Deno · all subjects

testing & linting

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

deno doc generates from JSDoc comments and TypeScript annotations

'deno doc' works out of the box with no setup required. It leverages JSDoc comments for documentation and automatically extracts type information from TypeScript type annotations in your code.

deno doc JSDoc best practice: use descriptive summaries

JSDoc comments should include a clear descriptive summary of what the function does, followed by @param tags for parameters and @returns tags for return values.

deno doc JSDoc best practice: provide concrete examples

Include @example tags with concrete, runnable code examples that show how to use the function. This helps developers understand the practical usage of your exported APIs.

deno doc JSDoc best practice: use @module for module-level docs

Add module-level documentation at the top of a file using '/**...@module*/' to describe what the module provides and its purpose.

deno doc JSDoc @deprecated and @experimental tags

Use @deprecated tag to mark legacy functions with guidance on what to use instead, and @experimental tag to mark new experimental features that may change in future versions.

deno test --allow-all option

deno test --allow-all runs tests with all permissions allowed.

fresh-server-event-handlers lint rule

The fresh-server-event-handlers lint rule disallows event handlers in Fresh server components. Components inside the routes/ folder in a Fresh app are exclusively rendered on the server and are not rendered in the client, so setting an event handler will have no effect. This rule only applies to server components inside the routes/ folder, not to Fresh islands or any other components.

fresh-server-event-handlers invalid examples

Invalid examples of event handlers in Fresh server components are: <button onClick={() => {}} />, <button onclick={() => {}} />, and <my-custom-element foo={() => {}} />.

fresh-server-event-handlers valid examples

Valid examples of Fresh server components without event handlers are: <button /> and <my-custom-element />.

Give your agent this brain