General
PromptBeginner5 minmarkdown
Untitled Skill
193
Ultracite Rules - AI-Ready Formatter and Linter
Loading actions...
Main instructions and any bundled files for this skill.
Ultracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.
accessKey attribute on any HTML element.aria-hidden="true" on focusable elements.<marquee> or <blink>.scope prop on <th> elements.tabIndex to non-interactive HTML elements.tabIndex property.title element for SVG elements.tabIndex to non-interactive HTML elements with aria-activedescendant.type attribute for button elements.aria-hidden).lang attribute on the html element.title attribute for iframe elements.onClick with at least one of: onKeyUp, onKeyDown, or onKeyPress.onMouseOver/onMouseOut with onFocus/onBlur.aria-*) are valid.autocomplete attribute on input elements.lang attribute.arguments object.this aliasing.Math.min and Math.max to clamp values when the result is constant.children and dangerouslySetInnerHTML props on the same element.<>...</> instead of <Fragment>...</Fragment>.preconnect attribute is used when using Google Fonts.Array#{indexOf,lastIndexOf}() instead of Array#{findIndex,findLastIndex}() when looking for the index of an item.with { type: "json" } for JSON module imports.Object.assign() when constructing new objects.parseInt().Symbol()....) syntax on accumulators.delete operator.target="_blank" without rel="noopener".! postfix operator.as const instead of literal types and type annotations.T[] or Array<T> consistently.export type for types.import type for types.eval().if statements that have else clauses.String.slice() instead of String.substr() and String.substring().else blocks when the if block breaks early.at() instead of integer index access.else if instead of nested if statements in else clauses.if statements instead of nested if clauses.new for all builtins except String, Number, and Boolean.const declarations for variables that are only assigned once.default clause in switch statements.** operator instead of Math.pow.for-of loops when you need the index to extract an item from the iterated array.node:assert/strict over node:assert.node: protocol for Node.js builtin modules.new when throwing an error.String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().=== and !==.<img> elements in Next.js projects.<head> elements in Next.js projects.npx ultracite init - Initialize Ultracite in your projectnpx ultracite fix - Format and fix code automaticallynpx ultracite check - Check for issues without fixing// ✅ Good: Comprehensive error handling
try {
const result = await fetchData();
return { success: true, data: result };
} catch (error) {
console.error('API call failed:', error);
return { success: false, error: error.message };
}
// ❌ Bad: Swallowing errors
try {
return await fetchData();
} catch (e) {
console.log(e);
}
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend li...
risks