{"owner":"OpenCut-app","repo":"OpenCut","hasSkills":true,"totalSkillsCount":1,"totalTokensCount":3629,"categories":["copilot-instructions"],"hasMcp":false,"mcpConfig":null,"found":[".github/copilot-instructions.md"],"skills":{".github/copilot-instructions.md":"---\r\napplyTo: \"**/*.{ts,tsx,js,jsx}\"\r\n---\r\n\r\n# Project Context\r\n\r\nUltracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.\r\n\r\n## Key Principles\r\n\r\n- Zero configuration required\r\n- Subsecond performance\r\n- Maximum type safety\r\n- AI-friendly code generation\r\n\r\n## Before Writing Code\r\n\r\n1. Analyze existing patterns in the codebase\r\n2. Consider edge cases and error scenarios\r\n3. Follow the rules below strictly\r\n4. Validate accessibility requirements\r\n\r\n## Rules\r\n\r\n### Accessibility (a11y)\r\n\r\n- Don't use `accessKey` attribute on any HTML element.\r\n- Don't set `aria-hidden=\"true\"` on focusable elements.\r\n- Don't add ARIA roles, states, and properties to elements that don't support them.\r\n- Don't use distracting elements like `<marquee>` or `<blink>`.\r\n- Only use the `scope` prop on `<th>` elements.\r\n- Don't assign non-interactive ARIA roles to interactive HTML elements.\r\n- Make sure label elements have text content and are associated with an input.\r\n- Don't assign interactive ARIA roles to non-interactive HTML elements.\r\n- Don't assign `tabIndex` to non-interactive HTML elements.\r\n- Don't use positive integers for `tabIndex` property.\r\n- Don't include \"image\", \"picture\", or \"photo\" in img alt prop.\r\n- Don't use explicit role property that's the same as the implicit/default role.\r\n- Make static elements with click handlers use a valid role attribute.\r\n- Always include a `title` element for SVG elements.\r\n- Give all elements requiring alt text meaningful information for screen readers.\r\n- Make sure anchors have content that's accessible to screen readers.\r\n- Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.\r\n- Include all required ARIA attributes for elements with ARIA roles.\r\n- Make sure ARIA properties are valid for the element's supported roles.\r\n- Always include a `type` attribute for button elements.\r\n- Make elements with interactive roles and handlers focusable.\r\n- Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).\r\n- Always include a `lang` attribute on the html element.\r\n- Always include a `title` attribute for iframe elements.\r\n- Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.\r\n- Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.\r\n- Include caption tracks for audio and video elements.\r\n- Use semantic elements instead of role attributes in JSX.\r\n- Make sure all anchors are valid and navigable.\r\n- Ensure all ARIA properties (`aria-*`) are valid.\r\n- Use valid, non-abstract ARIA roles for elements with ARIA roles.\r\n- Use valid ARIA state and property values.\r\n- Use valid values for the `autocomplete` attribute on input elements.\r\n- Use correct ISO language/country codes for the `lang` attribute.\r\n\r\n### Code Complexity and Quality\r\n\r\n- Don't use consecutive spaces in regular expression literals.\r\n- Don't use the `arguments` object.\r\n- Don't use primitive type aliases or misleading types.\r\n- Don't use the comma operator.\r\n- Don't use empty type parameters in type aliases and interfaces.\r\n- Don't write functions that exceed a given Cognitive Complexity score.\r\n- Don't nest describe() blocks too deeply in test files.\r\n- Don't use unnecessary boolean casts.\r\n- Don't use unnecessary callbacks with flatMap.\r\n- Use for...of statements instead of Array.forEach.\r\n- Don't create classes that only have static members (like a static namespace).\r\n- Don't use this and super in static contexts.\r\n- Don't use unnecessary catch clauses.\r\n- Don't use unnecessary constructors.\r\n- Don't use unnecessary continue statements.\r\n- Don't export empty modules that don't change anything.\r\n- Don't use unnecessary escape sequences in regular expression literals.\r\n- Don't use unnecessary fragments.\r\n- Don't use unnecessary labels.\r\n- Don't use unnecessary nested block statements.\r\n- Don't rename imports, exports, and destructured assignments to the same name.\r\n- Don't use unnecessary string or template literal concatenation.\r\n- Don't use String.raw in template literals when there are no escape sequences.\r\n- Don't use useless case statements in switch statements.\r\n- Don't use ternary operators when simpler alternatives exist.\r\n- Don't use useless `this` aliasing.\r\n- Don't use any or unknown as type constraints.\r\n- Don't initialize variables to undefined.\r\n- Don't use the void operators (they're not familiar).\r\n- Use arrow functions instead of function expressions.\r\n- Use Date.now() to get milliseconds since the Unix Epoch.\r\n- Use .flatMap() instead of map().flat() when possible.\r\n- Use literal property access instead of computed property access.\r\n- Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.\r\n- Use concise optional chaining instead of chained logical expressions.\r\n- Use regular expression literals instead of the RegExp constructor when possible.\r\n- Don't use number literal object member names that aren't base 10 or use underscore separators.\r\n- Remove redundant terms from logical expressions.\r\n- Use while loops instead of for loops when you don't need initializer and update expressions.\r\n- Don't pass children as props.\r\n- Don't reassign const variables.\r\n- Don't use constant expressions in conditions.\r\n- Don't use `Math.min` and `Math.max` to clamp values when the result is constant.\r\n- Don't return a value from a constructor.\r\n- Don't use empty character classes in regular expression literals.\r\n- Don't use empty destructuring patterns.\r\n- Don't call global object properties as functions.\r\n- Don't declare functions and vars that are accessible outside their block.\r\n- Make sure builtins are correctly instantiated.\r\n- Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.\r\n- Don't use variables and function parameters before they're declared.\r\n- Don't use 8 and 9 escape sequences in string literals.\r\n- Don't use literal numbers that lose precision.\r\n\r\n### React and JSX Best Practices\r\n\r\n- Don't use the return value of React.render.\r\n- Make sure all dependencies are correctly specified in React hooks.\r\n- Make sure all React hooks are called from the top level of component functions.\r\n- Don't forget key props in iterators and collection literals.\r\n- Don't destructure props inside JSX components in Solid projects.\r\n- Don't define React components inside other components.\r\n- Don't use event handlers on non-interactive elements.\r\n- Don't assign to React component props.\r\n- Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.\r\n- Don't use dangerous JSX props.\r\n- Don't use Array index in keys.\r\n- Don't insert comments as text nodes.\r\n- Don't assign JSX properties multiple times.\r\n- Don't add extra closing tags for components without children.\r\n- Use `<>...</>` instead of `<Fragment>...</Fragment>`.\r\n- Watch out for possible \"wrong\" semicolons inside JSX elements.\r\n\r\n### Correctness and Safety\r\n\r\n- Don't assign a value to itself.\r\n- Don't return a value from a setter.\r\n- Don't compare expressions that modify string case with non-compliant values.\r\n- Don't use lexical declarations in switch clauses.\r\n- Don't use variables that haven't been declared in the document.\r\n- Don't write unreachable code.\r\n- Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.\r\n- Don't use control flow statements in finally blocks.\r\n- Don't use optional chaining where undefined values aren't allowed.\r\n- Don't have unused function parameters.\r\n- Don't have unused imports.\r\n- Don't have unused labels.\r\n- Don't have unused private class members.\r\n- Don't have unused variables.\r\n- Make sure void (self-closing) elements don't have children.\r\n- Don't return a value from a function with the return type 'void'\r\n- Use isNaN() when checking for NaN.\r\n- Make sure \"for\" loop update clauses move the counter in the right direction.\r\n- Make sure typeof expressions are compared to valid values.\r\n- Make sure generator functions contain yield.\r\n- Don't use await inside loops.\r\n- Don't use bitwise operators.\r\n- Don't use expressions where the operation doesn't change the value.\r\n- Make sure Promise-like statements are handled appropriately.\r\n- Don't use **dirname and **filename in the global scope.\r\n- Prevent import cycles.\r\n- Don't use configured elements.\r\n- Don't hardcode sensitive data like API keys and tokens.\r\n- Don't let variable declarations shadow variables from outer scopes.\r\n- Don't use the TypeScript directive @ts-ignore.\r\n- Prevent duplicate polyfills from Polyfill.io.\r\n- Don't use useless backreferences in regular expressions that always match empty strings.\r\n- Don't use unnecessary escapes in string literals.\r\n- Don't use useless undefined.\r\n- Make sure getters and setters for the same property are next to each other in class and object definitions.\r\n- Make sure object literals are declared consistently (defaults to explicit definitions).\r\n- Use static Response methods instead of new Response() constructor when possible.\r\n- Make sure switch-case statements are exhaustive.\r\n- Make sure the `preconnect` attribute is used when using Google Fonts.\r\n- Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.\r\n- Make sure iterable callbacks return consistent values.\r\n- Use `with { type: \"json\" }` for JSON module imports.\r\n- Use numeric separators in numeric literals.\r\n- Use object spread instead of `Object.assign()` when constructing new objects.\r\n- Always use the radix argument when using `parseInt()`.\r\n- Make sure JSDoc comment lines start with a single asterisk, except for the first one.\r\n- Include a description parameter for `Symbol()`.\r\n- Don't use spread (`...`) syntax on accumulators.\r\n- Don't use the `delete` operator.\r\n- Don't access namespace imports dynamically.\r\n- Don't use namespace imports.\r\n- Declare regex literals at the top level.\r\n- Don't use `target=\"_blank\"` without `rel=\"noopener\"`.\r\n\r\n### TypeScript Best Practices\r\n\r\n- Don't use TypeScript enums.\r\n- Don't export imported variables.\r\n- Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.\r\n- Don't use TypeScript namespaces.\r\n- Don't use non-null assertions with the `!` postfix operator.\r\n- Don't use parameter properties in class constructors.\r\n- Don't use user-defined types.\r\n- Use `as const` instead of literal types and type annotations.\r\n- Use either `T[]` or `Array<T>` consistently.\r\n- Initialize each enum member value explicitly.\r\n- Use `export type` for types.\r\n- Use `import type` for types.\r\n- Make sure all enum members are literal values.\r\n- Don't use TypeScript const enum.\r\n- Don't declare empty interfaces.\r\n- Don't let variables evolve into any type through reassignments.\r\n- Don't use the any type.\r\n- Don't misuse the non-null assertion operator (!) in TypeScript files.\r\n- Don't use implicit any type on variable declarations.\r\n- Don't merge interfaces and classes unsafely.\r\n- Don't use overload signatures that aren't next to each other.\r\n- Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.\r\n\r\n### Style and Consistency\r\n\r\n- Don't use global `eval()`.\r\n- Don't use callbacks in asynchronous tests and hooks.\r\n- Don't use negation in `if` statements that have `else` clauses.\r\n- Don't use nested ternary expressions.\r\n- Don't reassign function parameters.\r\n- This rule lets you specify global variable names you don't want to use in your application.\r\n- Don't use specified modules when loaded by import or require.\r\n- Don't use constants whose value is the upper-case version of their name.\r\n- Use `String.slice()` instead of `String.substr()` and `String.substring()`.\r\n- Don't use template literals if you don't need interpolation or special-character handling.\r\n- Don't use `else` blocks when the `if` block breaks early.\r\n- Don't use yoda expressions.\r\n- Don't use Array constructors.\r\n- Use `at()` instead of integer index access.\r\n- Follow curly brace conventions.\r\n- Use `else if` instead of nested `if` statements in `else` clauses.\r\n- Use single `if` statements instead of nested `if` clauses.\r\n- Use `new` for all builtins except `String`, `Number`, and `Boolean`.\r\n- Use consistent accessibility modifiers on class properties and methods.\r\n- Use `const` declarations for variables that are only assigned once.\r\n- Put default function parameters and optional function parameters last.\r\n- Include a `default` clause in switch statements.\r\n- Use the `**` operator instead of `Math.pow`.\r\n- Use `for-of` loops when you need the index to extract an item from the iterated array.\r\n- Use `node:assert/strict` over `node:assert`.\r\n- Use the `node:` protocol for Node.js builtin modules.\r\n- Use Number properties instead of global ones.\r\n- Use assignment operator shorthand where possible.\r\n- Use function types instead of object types with call signatures.\r\n- Use template literals over string concatenation.\r\n- Use `new` when throwing an error.\r\n- Don't throw non-Error values.\r\n- Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.\r\n- Use standard constants instead of approximated literals.\r\n- Don't assign values in expressions.\r\n- Don't use async functions as Promise executors.\r\n- Don't reassign exceptions in catch clauses.\r\n- Don't reassign class members.\r\n- Don't compare against -0.\r\n- Don't use labeled statements that aren't loops.\r\n- Don't use void type outside of generic or return types.\r\n- Don't use console.\r\n- Don't use control characters and escape sequences that match control characters in regular expression literals.\r\n- Don't use debugger.\r\n- Don't assign directly to document.cookie.\r\n- Use `===` and `!==`.\r\n- Don't use duplicate case labels.\r\n- Don't use duplicate class members.\r\n- Don't use duplicate conditions in if-else-if chains.\r\n- Don't use two keys with the same name inside objects.\r\n- Don't use duplicate function parameter names.\r\n- Don't have duplicate hooks in describe blocks.\r\n- Don't use empty block statements and static blocks.\r\n- Don't let switch clauses fall through.\r\n- Don't reassign function declarations.\r\n- Don't allow assignments to native objects and read-only global variables.\r\n- Use Number.isFinite instead of global isFinite.\r\n- Use Number.isNaN instead of global isNaN.\r\n- Don't assign to imported bindings.\r\n- Don't use irregular whitespace characters.\r\n- Don't use labels that share a name with a variable.\r\n- Don't use characters made with multiple code points in character class syntax.\r\n- Make sure to use new and constructor properly.\r\n- Don't use shorthand assign when the variable appears on both sides.\r\n- Don't use octal escape sequences in string literals.\r\n- Don't use Object.prototype builtins directly.\r\n- Don't redeclare variables, functions, classes, and types in the same scope.\r\n- Don't have redundant \"use strict\".\r\n- Don't compare things where both sides are exactly the same.\r\n- Don't let identifiers shadow restricted names.\r\n- Don't use sparse arrays (arrays with holes).\r\n- Don't use template literal placeholder syntax in regular strings.\r\n- Don't use the then property.\r\n- Don't use unsafe negation.\r\n- Don't use var.\r\n- Don't use with statements in non-strict contexts.\r\n- Make sure async functions actually use await.\r\n- Make sure default clauses in switch statements come last.\r\n- Make sure to pass a message value when creating a built-in error.\r\n- Make sure get methods always return a value.\r\n- Use a recommended display strategy with Google Fonts.\r\n- Make sure for-in loops include an if statement.\r\n- Use Array.isArray() instead of instanceof Array.\r\n- Make sure to use the digits argument with Number#toFixed().\r\n- Make sure to use the \"use strict\" directive in script files.\r\n\r\n### Next.js Specific Rules\r\n\r\n- Don't use `<img>` elements in Next.js projects.\r\n- Don't use `<head>` elements in Next.js projects.\r\n- Don't import next/document outside of pages/\\_document.jsx in Next.js projects.\r\n- Don't use the next/head module in pages/\\_document.js on Next.js projects.\r\n\r\n### Testing Best Practices\r\n\r\n- Don't use export or module.exports in test files.\r\n- Don't use focused tests.\r\n- Make sure the assertion function, like expect, is placed inside an it() function call.\r\n- Don't use disabled tests.\r\n\r\n## Common Tasks\r\n\r\n- `npx ultracite init` - Initialize Ultracite in your project\r\n- `npx ultracite format` - Format and fix code automatically\r\n- `npx ultracite lint` - Check for issues without fixing\r\n\r\n## Example: Error Handling\r\n\r\n```typescript\r\n// ✅ Good: Comprehensive error handling\r\ntry {\r\n  const result = await fetchData();\r\n  return { success: true, data: result };\r\n} catch (error) {\r\n  console.error(\"API call failed:\", error);\r\n  return { success: false, error: error.message };\r\n}\r\n\r\n// ❌ Bad: Swallowing errors\r\ntry {\r\n  return await fetchData();\r\n} catch (e) {\r\n  console.log(e);\r\n}\r\n```\r\n"},"files":{".github/copilot-instructions.md":"---\r\napplyTo: \"**/*.{ts,tsx,js,jsx}\"\r\n---\r\n\r\n# Project Context\r\n\r\nUltracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.\r\n\r\n## Key Principles\r\n\r\n- Zero configuration required\r\n- Subsecond performance\r\n- Maximum type safety\r\n- AI-friendly code generation\r\n\r\n## Before Writing Code\r\n\r\n1. Analyze existing patterns in the codebase\r\n2. Consider edge cases and error scenarios\r\n3. Follow the rules below strictly\r\n4. Validate accessibility requirements\r\n\r\n## Rules\r\n\r\n### Accessibility (a11y)\r\n\r\n- Don't use `accessKey` attribute on any HTML element.\r\n- Don't set `aria-hidden=\"true\"` on focusable elements.\r\n- Don't add ARIA roles, states, and properties to elements that don't support them.\r\n- Don't use distracting elements like `<marquee>` or `<blink>`.\r\n- Only use the `scope` prop on `<th>` elements.\r\n- Don't assign non-interactive ARIA roles to interactive HTML elements.\r\n- Make sure label elements have text content and are associated with an input.\r\n- Don't assign interactive ARIA roles to non-interactive HTML elements.\r\n- Don't assign `tabIndex` to non-interactive HTML elements.\r\n- Don't use positive integers for `tabIndex` property.\r\n- Don't include \"image\", \"picture\", or \"photo\" in img alt prop.\r\n- Don't use explicit role property that's the same as the implicit/default role.\r\n- Make static elements with click handlers use a valid role attribute.\r\n- Always include a `title` element for SVG elements.\r\n- Give all elements requiring alt text meaningful information for screen readers.\r\n- Make sure anchors have content that's accessible to screen readers.\r\n- Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.\r\n- Include all required ARIA attributes for elements with ARIA roles.\r\n- Make sure ARIA properties are valid for the element's supported roles.\r\n- Always include a `type` attribute for button elements.\r\n- Make elements with interactive roles and handlers focusable.\r\n- Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).\r\n- Always include a `lang` attribute on the html element.\r\n- Always include a `title` attribute for iframe elements.\r\n- Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.\r\n- Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.\r\n- Include caption tracks for audio and video elements.\r\n- Use semantic elements instead of role attributes in JSX.\r\n- Make sure all anchors are valid and navigable.\r\n- Ensure all ARIA properties (`aria-*`) are valid.\r\n- Use valid, non-abstract ARIA roles for elements with ARIA roles.\r\n- Use valid ARIA state and property values.\r\n- Use valid values for the `autocomplete` attribute on input elements.\r\n- Use correct ISO language/country codes for the `lang` attribute.\r\n\r\n### Code Complexity and Quality\r\n\r\n- Don't use consecutive spaces in regular expression literals.\r\n- Don't use the `arguments` object.\r\n- Don't use primitive type aliases or misleading types.\r\n- Don't use the comma operator.\r\n- Don't use empty type parameters in type aliases and interfaces.\r\n- Don't write functions that exceed a given Cognitive Complexity score.\r\n- Don't nest describe() blocks too deeply in test files.\r\n- Don't use unnecessary boolean casts.\r\n- Don't use unnecessary callbacks with flatMap.\r\n- Use for...of statements instead of Array.forEach.\r\n- Don't create classes that only have static members (like a static namespace).\r\n- Don't use this and super in static contexts.\r\n- Don't use unnecessary catch clauses.\r\n- Don't use unnecessary constructors.\r\n- Don't use unnecessary continue statements.\r\n- Don't export empty modules that don't change anything.\r\n- Don't use unnecessary escape sequences in regular expression literals.\r\n- Don't use unnecessary fragments.\r\n- Don't use unnecessary labels.\r\n- Don't use unnecessary nested block statements.\r\n- Don't rename imports, exports, and destructured assignments to the same name.\r\n- Don't use unnecessary string or template literal concatenation.\r\n- Don't use String.raw in template literals when there are no escape sequences.\r\n- Don't use useless case statements in switch statements.\r\n- Don't use ternary operators when simpler alternatives exist.\r\n- Don't use useless `this` aliasing.\r\n- Don't use any or unknown as type constraints.\r\n- Don't initialize variables to undefined.\r\n- Don't use the void operators (they're not familiar).\r\n- Use arrow functions instead of function expressions.\r\n- Use Date.now() to get milliseconds since the Unix Epoch.\r\n- Use .flatMap() instead of map().flat() when possible.\r\n- Use literal property access instead of computed property access.\r\n- Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.\r\n- Use concise optional chaining instead of chained logical expressions.\r\n- Use regular expression literals instead of the RegExp constructor when possible.\r\n- Don't use number literal object member names that aren't base 10 or use underscore separators.\r\n- Remove redundant terms from logical expressions.\r\n- Use while loops instead of for loops when you don't need initializer and update expressions.\r\n- Don't pass children as props.\r\n- Don't reassign const variables.\r\n- Don't use constant expressions in conditions.\r\n- Don't use `Math.min` and `Math.max` to clamp values when the result is constant.\r\n- Don't return a value from a constructor.\r\n- Don't use empty character classes in regular expression literals.\r\n- Don't use empty destructuring patterns.\r\n- Don't call global object properties as functions.\r\n- Don't declare functions and vars that are accessible outside their block.\r\n- Make sure builtins are correctly instantiated.\r\n- Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.\r\n- Don't use variables and function parameters before they're declared.\r\n- Don't use 8 and 9 escape sequences in string literals.\r\n- Don't use literal numbers that lose precision.\r\n\r\n### React and JSX Best Practices\r\n\r\n- Don't use the return value of React.render.\r\n- Make sure all dependencies are correctly specified in React hooks.\r\n- Make sure all React hooks are called from the top level of component functions.\r\n- Don't forget key props in iterators and collection literals.\r\n- Don't destructure props inside JSX components in Solid projects.\r\n- Don't define React components inside other components.\r\n- Don't use event handlers on non-interactive elements.\r\n- Don't assign to React component props.\r\n- Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.\r\n- Don't use dangerous JSX props.\r\n- Don't use Array index in keys.\r\n- Don't insert comments as text nodes.\r\n- Don't assign JSX properties multiple times.\r\n- Don't add extra closing tags for components without children.\r\n- Use `<>...</>` instead of `<Fragment>...</Fragment>`.\r\n- Watch out for possible \"wrong\" semicolons inside JSX elements.\r\n\r\n### Correctness and Safety\r\n\r\n- Don't assign a value to itself.\r\n- Don't return a value from a setter.\r\n- Don't compare expressions that modify string case with non-compliant values.\r\n- Don't use lexical declarations in switch clauses.\r\n- Don't use variables that haven't been declared in the document.\r\n- Don't write unreachable code.\r\n- Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.\r\n- Don't use control flow statements in finally blocks.\r\n- Don't use optional chaining where undefined values aren't allowed.\r\n- Don't have unused function parameters.\r\n- Don't have unused imports.\r\n- Don't have unused labels.\r\n- Don't have unused private class members.\r\n- Don't have unused variables.\r\n- Make sure void (self-closing) elements don't have children.\r\n- Don't return a value from a function with the return type 'void'\r\n- Use isNaN() when checking for NaN.\r\n- Make sure \"for\" loop update clauses move the counter in the right direction.\r\n- Make sure typeof expressions are compared to valid values.\r\n- Make sure generator functions contain yield.\r\n- Don't use await inside loops.\r\n- Don't use bitwise operators.\r\n- Don't use expressions where the operation doesn't change the value.\r\n- Make sure Promise-like statements are handled appropriately.\r\n- Don't use **dirname and **filename in the global scope.\r\n- Prevent import cycles.\r\n- Don't use configured elements.\r\n- Don't hardcode sensitive data like API keys and tokens.\r\n- Don't let variable declarations shadow variables from outer scopes.\r\n- Don't use the TypeScript directive @ts-ignore.\r\n- Prevent duplicate polyfills from Polyfill.io.\r\n- Don't use useless backreferences in regular expressions that always match empty strings.\r\n- Don't use unnecessary escapes in string literals.\r\n- Don't use useless undefined.\r\n- Make sure getters and setters for the same property are next to each other in class and object definitions.\r\n- Make sure object literals are declared consistently (defaults to explicit definitions).\r\n- Use static Response methods instead of new Response() constructor when possible.\r\n- Make sure switch-case statements are exhaustive.\r\n- Make sure the `preconnect` attribute is used when using Google Fonts.\r\n- Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.\r\n- Make sure iterable callbacks return consistent values.\r\n- Use `with { type: \"json\" }` for JSON module imports.\r\n- Use numeric separators in numeric literals.\r\n- Use object spread instead of `Object.assign()` when constructing new objects.\r\n- Always use the radix argument when using `parseInt()`.\r\n- Make sure JSDoc comment lines start with a single asterisk, except for the first one.\r\n- Include a description parameter for `Symbol()`.\r\n- Don't use spread (`...`) syntax on accumulators.\r\n- Don't use the `delete` operator.\r\n- Don't access namespace imports dynamically.\r\n- Don't use namespace imports.\r\n- Declare regex literals at the top level.\r\n- Don't use `target=\"_blank\"` without `rel=\"noopener\"`.\r\n\r\n### TypeScript Best Practices\r\n\r\n- Don't use TypeScript enums.\r\n- Don't export imported variables.\r\n- Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.\r\n- Don't use TypeScript namespaces.\r\n- Don't use non-null assertions with the `!` postfix operator.\r\n- Don't use parameter properties in class constructors.\r\n- Don't use user-defined types.\r\n- Use `as const` instead of literal types and type annotations.\r\n- Use either `T[]` or `Array<T>` consistently.\r\n- Initialize each enum member value explicitly.\r\n- Use `export type` for types.\r\n- Use `import type` for types.\r\n- Make sure all enum members are literal values.\r\n- Don't use TypeScript const enum.\r\n- Don't declare empty interfaces.\r\n- Don't let variables evolve into any type through reassignments.\r\n- Don't use the any type.\r\n- Don't misuse the non-null assertion operator (!) in TypeScript files.\r\n- Don't use implicit any type on variable declarations.\r\n- Don't merge interfaces and classes unsafely.\r\n- Don't use overload signatures that aren't next to each other.\r\n- Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.\r\n\r\n### Style and Consistency\r\n\r\n- Don't use global `eval()`.\r\n- Don't use callbacks in asynchronous tests and hooks.\r\n- Don't use negation in `if` statements that have `else` clauses.\r\n- Don't use nested ternary expressions.\r\n- Don't reassign function parameters.\r\n- This rule lets you specify global variable names you don't want to use in your application.\r\n- Don't use specified modules when loaded by import or require.\r\n- Don't use constants whose value is the upper-case version of their name.\r\n- Use `String.slice()` instead of `String.substr()` and `String.substring()`.\r\n- Don't use template literals if you don't need interpolation or special-character handling.\r\n- Don't use `else` blocks when the `if` block breaks early.\r\n- Don't use yoda expressions.\r\n- Don't use Array constructors.\r\n- Use `at()` instead of integer index access.\r\n- Follow curly brace conventions.\r\n- Use `else if` instead of nested `if` statements in `else` clauses.\r\n- Use single `if` statements instead of nested `if` clauses.\r\n- Use `new` for all builtins except `String`, `Number`, and `Boolean`.\r\n- Use consistent accessibility modifiers on class properties and methods.\r\n- Use `const` declarations for variables that are only assigned once.\r\n- Put default function parameters and optional function parameters last.\r\n- Include a `default` clause in switch statements.\r\n- Use the `**` operator instead of `Math.pow`.\r\n- Use `for-of` loops when you need the index to extract an item from the iterated array.\r\n- Use `node:assert/strict` over `node:assert`.\r\n- Use the `node:` protocol for Node.js builtin modules.\r\n- Use Number properties instead of global ones.\r\n- Use assignment operator shorthand where possible.\r\n- Use function types instead of object types with call signatures.\r\n- Use template literals over string concatenation.\r\n- Use `new` when throwing an error.\r\n- Don't throw non-Error values.\r\n- Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.\r\n- Use standard constants instead of approximated literals.\r\n- Don't assign values in expressions.\r\n- Don't use async functions as Promise executors.\r\n- Don't reassign exceptions in catch clauses.\r\n- Don't reassign class members.\r\n- Don't compare against -0.\r\n- Don't use labeled statements that aren't loops.\r\n- Don't use void type outside of generic or return types.\r\n- Don't use console.\r\n- Don't use control characters and escape sequences that match control characters in regular expression literals.\r\n- Don't use debugger.\r\n- Don't assign directly to document.cookie.\r\n- Use `===` and `!==`.\r\n- Don't use duplicate case labels.\r\n- Don't use duplicate class members.\r\n- Don't use duplicate conditions in if-else-if chains.\r\n- Don't use two keys with the same name inside objects.\r\n- Don't use duplicate function parameter names.\r\n- Don't have duplicate hooks in describe blocks.\r\n- Don't use empty block statements and static blocks.\r\n- Don't let switch clauses fall through.\r\n- Don't reassign function declarations.\r\n- Don't allow assignments to native objects and read-only global variables.\r\n- Use Number.isFinite instead of global isFinite.\r\n- Use Number.isNaN instead of global isNaN.\r\n- Don't assign to imported bindings.\r\n- Don't use irregular whitespace characters.\r\n- Don't use labels that share a name with a variable.\r\n- Don't use characters made with multiple code points in character class syntax.\r\n- Make sure to use new and constructor properly.\r\n- Don't use shorthand assign when the variable appears on both sides.\r\n- Don't use octal escape sequences in string literals.\r\n- Don't use Object.prototype builtins directly.\r\n- Don't redeclare variables, functions, classes, and types in the same scope.\r\n- Don't have redundant \"use strict\".\r\n- Don't compare things where both sides are exactly the same.\r\n- Don't let identifiers shadow restricted names.\r\n- Don't use sparse arrays (arrays with holes).\r\n- Don't use template literal placeholder syntax in regular strings.\r\n- Don't use the then property.\r\n- Don't use unsafe negation.\r\n- Don't use var.\r\n- Don't use with statements in non-strict contexts.\r\n- Make sure async functions actually use await.\r\n- Make sure default clauses in switch statements come last.\r\n- Make sure to pass a message value when creating a built-in error.\r\n- Make sure get methods always return a value.\r\n- Use a recommended display strategy with Google Fonts.\r\n- Make sure for-in loops include an if statement.\r\n- Use Array.isArray() instead of instanceof Array.\r\n- Make sure to use the digits argument with Number#toFixed().\r\n- Make sure to use the \"use strict\" directive in script files.\r\n\r\n### Next.js Specific Rules\r\n\r\n- Don't use `<img>` elements in Next.js projects.\r\n- Don't use `<head>` elements in Next.js projects.\r\n- Don't import next/document outside of pages/\\_document.jsx in Next.js projects.\r\n- Don't use the next/head module in pages/\\_document.js on Next.js projects.\r\n\r\n### Testing Best Practices\r\n\r\n- Don't use export or module.exports in test files.\r\n- Don't use focused tests.\r\n- Make sure the assertion function, like expect, is placed inside an it() function call.\r\n- Don't use disabled tests.\r\n\r\n## Common Tasks\r\n\r\n- `npx ultracite init` - Initialize Ultracite in your project\r\n- `npx ultracite format` - Format and fix code automatically\r\n- `npx ultracite lint` - Check for issues without fixing\r\n\r\n## Example: Error Handling\r\n\r\n```typescript\r\n// ✅ Good: Comprehensive error handling\r\ntry {\r\n  const result = await fetchData();\r\n  return { success: true, data: result };\r\n} catch (error) {\r\n  console.error(\"API call failed:\", error);\r\n  return { success: false, error: error.message };\r\n}\r\n\r\n// ❌ Bad: Swallowing errors\r\ntry {\r\n  return await fetchData();\r\n} catch (e) {\r\n  console.log(e);\r\n}\r\n```\r\n"},"items":[{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/OpenCut-app/OpenCut/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"---\r\napplyTo: \"**/*.{ts,tsx,js,jsx}\"\r\n---\r\n\r\n# Project Context\r\n\r\nUltracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.\r\n\r\n## Key Principles\r\n\r\n- Zero configuration required\r\n- Subsecond performance\r\n- Maximum type safety\r\n- AI-friendly code generation\r\n\r\n## Before Writing Code\r\n\r\n1. Analyze existing patterns in the codebase\r\n2. Consider edge cases and error scenarios\r\n3. Follow the rules below strictly\r\n4. Validate accessibility requirements\r\n\r\n## Rules\r\n\r\n### Accessibility (a11y)\r\n\r\n- Don't use `accessKey` attribute on any HTML element.\r\n- Don't set `aria-hidden=\"true\"` on focusable elements.\r\n- Don't add ARIA roles, states, and properties to elements that don't support them.\r\n- Don't use distracting elements like `<marquee>` or `<blink>`.\r\n- Only use the `scope` prop on `<th>` elements.\r\n- Don't assign non-interactive ARIA roles to interactive HTML elements.\r\n- Make sure label elements have text content and are associated with an input.\r\n- Don't assign interactive ARIA roles to non-interactive HTML elements.\r\n- Don't assign `tabIndex` to non-interactive HTML elements.\r\n- Don't use positive integers for `tabIndex` property.\r\n- Don't include \"image\", \"picture\", or \"photo\" in img alt prop.\r\n- Don't use explicit role property that's the same as the implicit/default role.\r\n- Make static elements with click handlers use a valid role attribute.\r\n- Always include a `title` element for SVG elements.\r\n- Give all elements requiring alt text meaningful information for screen readers.\r\n- Make sure anchors have content that's accessible to screen readers.\r\n- Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.\r\n- Include all required ARIA attributes for elements with ARIA roles.\r\n- Make sure ARIA properties are valid for the element's supported roles.\r\n- Always include a `type` attribute for button elements.\r\n- Make elements with interactive roles and handlers focusable.\r\n- Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).\r\n- Always include a `lang` attribute on the html element.\r\n- Always include a `title` attribute for iframe elements.\r\n- Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.\r\n- Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.\r\n- Include caption tracks for audio and video elements.\r\n- Use semantic elements instead of role attributes in JSX.\r\n- Make sure all anchors are valid and navigable.\r\n- Ensure all ARIA properties (`aria-*`) are valid.\r\n- Use valid, non-abstract ARIA roles for elements with ARIA roles.\r\n- Use valid ARIA state and property values.\r\n- Use valid values for the `autocomplete` attribute on input elements.\r\n- Use correct ISO language/country codes for the `lang` attribute.\r\n\r\n### Code Complexity and Quality\r\n\r\n- Don't use consecutive spaces in regular expression literals.\r\n- Don't use the `arguments` object.\r\n- Don't use primitive type aliases or misleading types.\r\n- Don't use the comma operator.\r\n- Don't use empty type parameters in type aliases and interfaces.\r\n- Don't write functions that exceed a given Cognitive Complexity score.\r\n- Don't nest describe() blocks too deeply in test files.\r\n- Don't use unnecessary boolean casts.\r\n- Don't use unnecessary callbacks with flatMap.\r\n- Use for...of statements instead of Array.forEach.\r\n- Don't create classes that only have static members (like a static namespace).\r\n- Don't use this and super in static contexts.\r\n- Don't use unnecessary catch clauses.\r\n- Don't use unnecessary constructors.\r\n- Don't use unnecessary continue statements.\r\n- Don't export empty modules that don't change anything.\r\n- Don't use unnecessary escape sequences in regular expression literals.\r\n- Don't use unnecessary fragments.\r\n- Don't use unnecessary labels.\r\n- Don't use unnecessary nested block statements.\r\n- Don't rename imports, exports, and destructured assignments to the same name.\r\n- Don't use unnecessary string or template literal concatenation.\r\n- Don't use String.raw in template literals when there are no escape sequences.\r\n- Don't use useless case statements in switch statements.\r\n- Don't use ternary operators when simpler alternatives exist.\r\n- Don't use useless `this` aliasing.\r\n- Don't use any or unknown as type constraints.\r\n- Don't initialize variables to undefined.\r\n- Don't use the void operators (they're not familiar).\r\n- Use arrow functions instead of function expressions.\r\n- Use Date.now() to get milliseconds since the Unix Epoch.\r\n- Use .flatMap() instead of map().flat() when possible.\r\n- Use literal property access instead of computed property access.\r\n- Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.\r\n- Use concise optional chaining instead of chained logical expressions.\r\n- Use regular expression literals instead of the RegExp constructor when possible.\r\n- Don't use number literal object member names that aren't base 10 or use underscore separators.\r\n- Remove redundant terms from logical expressions.\r\n- Use while loops instead of for loops when you don't need initializer and update expressions.\r\n- Don't pass children as props.\r\n- Don't reassign const variables.\r\n- Don't use constant expressions in conditions.\r\n- Don't use `Math.min` and `Math.max` to clamp values when the result is constant.\r\n- Don't return a value from a constructor.\r\n- Don't use empty character classes in regular expression literals.\r\n- Don't use empty destructuring patterns.\r\n- Don't call global object properties as functions.\r\n- Don't declare functions and vars that are accessible outside their block.\r\n- Make sure builtins are correctly instantiated.\r\n- Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.\r\n- Don't use variables and function parameters before they're declared.\r\n- Don't use 8 and 9 escape sequences in string literals.\r\n- Don't use literal numbers that lose precision.\r\n\r\n### React and JSX Best Practices\r\n\r\n- Don't use the return value of React.render.\r\n- Make sure all dependencies are correctly specified in React hooks.\r\n- Make sure all React hooks are called from the top level of component functions.\r\n- Don't forget key props in iterators and collection literals.\r\n- Don't destructure props inside JSX components in Solid projects.\r\n- Don't define React components inside other components.\r\n- Don't use event handlers on non-interactive elements.\r\n- Don't assign to React component props.\r\n- Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.\r\n- Don't use dangerous JSX props.\r\n- Don't use Array index in keys.\r\n- Don't insert comments as text nodes.\r\n- Don't assign JSX properties multiple times.\r\n- Don't add extra closing tags for components without children.\r\n- Use `<>...</>` instead of `<Fragment>...</Fragment>`.\r\n- Watch out for possible \"wrong\" semicolons inside JSX elements.\r\n\r\n### Correctness and Safety\r\n\r\n- Don't assign a value to itself.\r\n- Don't return a value from a setter.\r\n- Don't compare expressions that modify string case with non-compliant values.\r\n- Don't use lexical declarations in switch clauses.\r\n- Don't use variables that haven't been declared in the document.\r\n- Don't write unreachable code.\r\n- Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.\r\n- Don't use control flow statements in finally blocks.\r\n- Don't use optional chaining where undefined values aren't allowed.\r\n- Don't have unused function parameters.\r\n- Don't have unused imports.\r\n- Don't have unused labels.\r\n- Don't have unused private class members.\r\n- Don't have unused variables.\r\n- Make sure void (self-closing) elements don't have children.\r\n- Don't return a value from a function with the return type 'void'\r\n- Use isNaN() when checking for NaN.\r\n- Make sure \"for\" loop update clauses move the counter in the right direction.\r\n- Make sure typeof expressions are compared to valid values.\r\n- Make sure generator functions contain yield.\r\n- Don't use await inside loops.\r\n- Don't use bitwise operators.\r\n- Don't use expressions where the operation doesn't change the value.\r\n- Make sure Promise-like statements are handled appropriately.\r\n- Don't use **dirname and **filename in the global scope.\r\n- Prevent import cycles.\r\n- Don't use configured elements.\r\n- Don't hardcode sensitive data like API keys and tokens.\r\n- Don't let variable declarations shadow variables from outer scopes.\r\n- Don't use the TypeScript directive @ts-ignore.\r\n- Prevent duplicate polyfills from Polyfill.io.\r\n- Don't use useless backreferences in regular expressions that always match empty strings.\r\n- Don't use unnecessary escapes in string literals.\r\n- Don't use useless undefined.\r\n- Make sure getters and setters for the same property are next to each other in class and object definitions.\r\n- Make sure object literals are declared consistently (defaults to explicit definitions).\r\n- Use static Response methods instead of new Response() constructor when possible.\r\n- Make sure switch-case statements are exhaustive.\r\n- Make sure the `preconnect` attribute is used when using Google Fonts.\r\n- Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.\r\n- Make sure iterable callbacks return consistent values.\r\n- Use `with { type: \"json\" }` for JSON module imports.\r\n- Use numeric separators in numeric literals.\r\n- Use object spread instead of `Object.assign()` when constructing new objects.\r\n- Always use the radix argument when using `parseInt()`.\r\n- Make sure JSDoc comment lines start with a single asterisk, except for the first one.\r\n- Include a description parameter for `Symbol()`.\r\n- Don't use spread (`...`) syntax on accumulators.\r\n- Don't use the `delete` operator.\r\n- Don't access namespace imports dynamically.\r\n- Don't use namespace imports.\r\n- Declare regex literals at the top level.\r\n- Don't use `target=\"_blank\"` without `rel=\"noopener\"`.\r\n\r\n### TypeScript Best Practices\r\n\r\n- Don't use TypeScript enums.\r\n- Don't export imported variables.\r\n- Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.\r\n- Don't use TypeScript namespaces.\r\n- Don't use non-null assertions with the `!` postfix operator.\r\n- Don't use parameter properties in class constructors.\r\n- Don't use user-defined types.\r\n- Use `as const` instead of literal types and type annotations.\r\n- Use either `T[]` or `Array<T>` consistently.\r\n- Initialize each enum member value explicitly.\r\n- Use `export type` for types.\r\n- Use `import type` for types.\r\n- Make sure all enum members are literal values.\r\n- Don't use TypeScript const enum.\r\n- Don't declare empty interfaces.\r\n- Don't let variables evolve into any type through reassignments.\r\n- Don't use the any type.\r\n- Don't misuse the non-null assertion operator (!) in TypeScript files.\r\n- Don't use implicit any type on variable declarations.\r\n- Don't merge interfaces and classes unsafely.\r\n- Don't use overload signatures that aren't next to each other.\r\n- Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.\r\n\r\n### Style and Consistency\r\n\r\n- Don't use global `eval()`.\r\n- Don't use callbacks in asynchronous tests and hooks.\r\n- Don't use negation in `if` statements that have `else` clauses.\r\n- Don't use nested ternary expressions.\r\n- Don't reassign function parameters.\r\n- This rule lets you specify global variable names you don't want to use in your application.\r\n- Don't use specified modules when loaded by import or require.\r\n- Don't use constants whose value is the upper-case version of their name.\r\n- Use `String.slice()` instead of `String.substr()` and `String.substring()`.\r\n- Don't use template literals if you don't need interpolation or special-character handling.\r\n- Don't use `else` blocks when the `if` block breaks early.\r\n- Don't use yoda expressions.\r\n- Don't use Array constructors.\r\n- Use `at()` instead of integer index access.\r\n- Follow curly brace conventions.\r\n- Use `else if` instead of nested `if` statements in `else` clauses.\r\n- Use single `if` statements instead of nested `if` clauses.\r\n- Use `new` for all builtins except `String`, `Number`, and `Boolean`.\r\n- Use consistent accessibility modifiers on class properties and methods.\r\n- Use `const` declarations for variables that are only assigned once.\r\n- Put default function parameters and optional function parameters last.\r\n- Include a `default` clause in switch statements.\r\n- Use the `**` operator instead of `Math.pow`.\r\n- Use `for-of` loops when you need the index to extract an item from the iterated array.\r\n- Use `node:assert/strict` over `node:assert`.\r\n- Use the `node:` protocol for Node.js builtin modules.\r\n- Use Number properties instead of global ones.\r\n- Use assignment operator shorthand where possible.\r\n- Use function types instead of object types with call signatures.\r\n- Use template literals over string concatenation.\r\n- Use `new` when throwing an error.\r\n- Don't throw non-Error values.\r\n- Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.\r\n- Use standard constants instead of approximated literals.\r\n- Don't assign values in expressions.\r\n- Don't use async functions as Promise executors.\r\n- Don't reassign exceptions in catch clauses.\r\n- Don't reassign class members.\r\n- Don't compare against -0.\r\n- Don't use labeled statements that aren't loops.\r\n- Don't use void type outside of generic or return types.\r\n- Don't use console.\r\n- Don't use control characters and escape sequences that match control characters in regular expression literals.\r\n- Don't use debugger.\r\n- Don't assign directly to document.cookie.\r\n- Use `===` and `!==`.\r\n- Don't use duplicate case labels.\r\n- Don't use duplicate class members.\r\n- Don't use duplicate conditions in if-else-if chains.\r\n- Don't use two keys with the same name inside objects.\r\n- Don't use duplicate function parameter names.\r\n- Don't have duplicate hooks in describe blocks.\r\n- Don't use empty block statements and static blocks.\r\n- Don't let switch clauses fall through.\r\n- Don't reassign function declarations.\r\n- Don't allow assignments to native objects and read-only global variables.\r\n- Use Number.isFinite instead of global isFinite.\r\n- Use Number.isNaN instead of global isNaN.\r\n- Don't assign to imported bindings.\r\n- Don't use irregular whitespace characters.\r\n- Don't use labels that share a name with a variable.\r\n- Don't use characters made with multiple code points in character class syntax.\r\n- Make sure to use new and constructor properly.\r\n- Don't use shorthand assign when the variable appears on both sides.\r\n- Don't use octal escape sequences in string literals.\r\n- Don't use Object.prototype builtins directly.\r\n- Don't redeclare variables, functions, classes, and types in the same scope.\r\n- Don't have redundant \"use strict\".\r\n- Don't compare things where both sides are exactly the same.\r\n- Don't let identifiers shadow restricted names.\r\n- Don't use sparse arrays (arrays with holes).\r\n- Don't use template literal placeholder syntax in regular strings.\r\n- Don't use the then property.\r\n- Don't use unsafe negation.\r\n- Don't use var.\r\n- Don't use with statements in non-strict contexts.\r\n- Make sure async functions actually use await.\r\n- Make sure default clauses in switch statements come last.\r\n- Make sure to pass a message value when creating a built-in error.\r\n- Make sure get methods always return a value.\r\n- Use a recommended display strategy with Google Fonts.\r\n- Make sure for-in loops include an if statement.\r\n- Use Array.isArray() instead of instanceof Array.\r\n- Make sure to use the digits argument with Number#toFixed().\r\n- Make sure to use the \"use strict\" directive in script files.\r\n\r\n### Next.js Specific Rules\r\n\r\n- Don't use `<img>` elements in Next.js projects.\r\n- Don't use `<head>` elements in Next.js projects.\r\n- Don't import next/document outside of pages/\\_document.jsx in Next.js projects.\r\n- Don't use the next/head module in pages/\\_document.js on Next.js projects.\r\n\r\n### Testing Best Practices\r\n\r\n- Don't use export or module.exports in test files.\r\n- Don't use focused tests.\r\n- Make sure the assertion function, like expect, is placed inside an it() function call.\r\n- Don't use disabled tests.\r\n\r\n## Common Tasks\r\n\r\n- `npx ultracite init` - Initialize Ultracite in your project\r\n- `npx ultracite format` - Format and fix code automatically\r\n- `npx ultracite lint` - Check for issues without fixing\r\n\r\n## Example: Error Handling\r\n\r\n```typescript\r\n// ✅ Good: Comprehensive error handling\r\ntry {\r\n  const result = await fetchData();\r\n  return { success: true, data: result };\r\n} catch (error) {\r\n  console.error(\"API call failed:\", error);\r\n  return { success: false, error: error.message };\r\n}\r\n\r\n// ❌ Bad: Swallowing errors\r\ntry {\r\n  return await fetchData();\r\n} catch (e) {\r\n  console.log(e);\r\n}\r\n```\r\n","frontmatter":{"applyTo":"**/*.{ts,tsx,js,jsx}"},"isInternal":false,"tokens":3629,"sizeBytes":17109}],"systemPromptSnippet":"<yakaai_skills repo=\"OpenCut-app/OpenCut\">\n<!-- File: .github/copilot-instructions.md (Tokens: ~3629 | Category: copilot-instructions) -->\n---\r\napplyTo: \"**/*.{ts,tsx,js,jsx}\"\r\n---\r\n\r\n# Project Context\r\n\r\nUltracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.\r\n\r\n## Key Principles\r\n\r\n- Zero configuration required\r\n- Subsecond performance\r\n- Maximum type safety\r\n- AI-friendly code generation\r\n\r\n## Before Writing Code\r\n\r\n1. Analyze existing patterns in the codebase\r\n2. Consider edge cases and error scenarios\r\n3. Follow the rules below strictly\r\n4. Validate accessibility requirements\r\n\r\n## Rules\r\n\r\n### Accessibility (a11y)\r\n\r\n- Don't use `accessKey` attribute on any HTML element.\r\n- Don't set `aria-hidden=\"true\"` on focusable elements.\r\n- Don't add ARIA roles, states, and properties to elements that don't support them.\r\n- Don't use distracting elements like `<marquee>` or `<blink>`.\r\n- Only use the `scope` prop on `<th>` elements.\r\n- Don't assign non-interactive ARIA roles to interactive HTML elements.\r\n- Make sure label elements have text content and are associated with an input.\r\n- Don't assign interactive ARIA roles to non-interactive HTML elements.\r\n- Don't assign `tabIndex` to non-interactive HTML elements.\r\n- Don't use positive integers for `tabIndex` property.\r\n- Don't include \"image\", \"picture\", or \"photo\" in img alt prop.\r\n- Don't use explicit role property that's the same as the implicit/default role.\r\n- Make static elements with click handlers use a valid role attribute.\r\n- Always include a `title` element for SVG elements.\r\n- Give all elements requiring alt text meaningful information for screen readers.\r\n- Make sure anchors have content that's accessible to screen readers.\r\n- Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.\r\n- Include all required ARIA attributes for elements with ARIA roles.\r\n- Make sure ARIA properties are valid for the element's supported roles.\r\n- Always include a `type` attribute for button elements.\r\n- Make elements with interactive roles and handlers focusable.\r\n- Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).\r\n- Always include a `lang` attribute on the html element.\r\n- Always include a `title` attribute for iframe elements.\r\n- Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.\r\n- Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.\r\n- Include caption tracks for audio and video elements.\r\n- Use semantic elements instead of role attributes in JSX.\r\n- Make sure all anchors are valid and navigable.\r\n- Ensure all ARIA properties (`aria-*`) are valid.\r\n- Use valid, non-abstract ARIA roles for elements with ARIA roles.\r\n- Use valid ARIA state and property values.\r\n- Use valid values for the `autocomplete` attribute on input elements.\r\n- Use correct ISO language/country codes for the `lang` attribute.\r\n\r\n### Code Complexity and Quality\r\n\r\n- Don't use consecutive spaces in regular expression literals.\r\n- Don't use the `arguments` object.\r\n- Don't use primitive type aliases or misleading types.\r\n- Don't use the comma operator.\r\n- Don't use empty type parameters in type aliases and interfaces.\r\n- Don't write functions that exceed a given Cognitive Complexity score.\r\n- Don't nest describe() blocks too deeply in test files.\r\n- Don't use unnecessary boolean casts.\r\n- Don't use unnecessary callbacks with flatMap.\r\n- Use for...of statements instead of Array.forEach.\r\n- Don't create classes that only have static members (like a static namespace).\r\n- Don't use this and super in static contexts.\r\n- Don't use unnecessary catch clauses.\r\n- Don't use unnecessary constructors.\r\n- Don't use unnecessary continue statements.\r\n- Don't export empty modules that don't change anything.\r\n- Don't use unnecessary escape sequences in regular expression literals.\r\n- Don't use unnecessary fragments.\r\n- Don't use unnecessary labels.\r\n- Don't use unnecessary nested block statements.\r\n- Don't rename imports, exports, and destructured assignments to the same name.\r\n- Don't use unnecessary string or template literal concatenation.\r\n- Don't use String.raw in template literals when there are no escape sequences.\r\n- Don't use useless case statements in switch statements.\r\n- Don't use ternary operators when simpler alternatives exist.\r\n- Don't use useless `this` aliasing.\r\n- Don't use any or unknown as type constraints.\r\n- Don't initialize variables to undefined.\r\n- Don't use the void operators (they're not familiar).\r\n- Use arrow functions instead of function expressions.\r\n- Use Date.now() to get milliseconds since the Unix Epoch.\r\n- Use .flatMap() instead of map().flat() when possible.\r\n- Use literal property access instead of computed property access.\r\n- Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.\r\n- Use concise optional chaining instead of chained logical expressions.\r\n- Use regular expression literals instead of the RegExp constructor when possible.\r\n- Don't use number literal object member names that aren't base 10 or use underscore separators.\r\n- Remove redundant terms from logical expressions.\r\n- Use while loops instead of for loops when you don't need initializer and update expressions.\r\n- Don't pass children as props.\r\n- Don't reassign const variables.\r\n- Don't use constant expressions in conditions.\r\n- Don't use `Math.min` and `Math.max` to clamp values when the result is constant.\r\n- Don't return a value from a constructor.\r\n- Don't use empty character classes in regular expression literals.\r\n- Don't use empty destructuring patterns.\r\n- Don't call global object properties as functions.\r\n- Don't declare functions and vars that are accessible outside their block.\r\n- Make sure builtins are correctly instantiated.\r\n- Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.\r\n- Don't use variables and function parameters before they're declared.\r\n- Don't use 8 and 9 escape sequences in string literals.\r\n- Don't use literal numbers that lose precision.\r\n\r\n### React and JSX Best Practices\r\n\r\n- Don't use the return value of React.render.\r\n- Make sure all dependencies are correctly specified in React hooks.\r\n- Make sure all React hooks are called from the top level of component functions.\r\n- Don't forget key props in iterators and collection literals.\r\n- Don't destructure props inside JSX components in Solid projects.\r\n- Don't define React components inside other components.\r\n- Don't use event handlers on non-interactive elements.\r\n- Don't assign to React component props.\r\n- Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.\r\n- Don't use dangerous JSX props.\r\n- Don't use Array index in keys.\r\n- Don't insert comments as text nodes.\r\n- Don't assign JSX properties multiple times.\r\n- Don't add extra closing tags for components without children.\r\n- Use `<>...</>` instead of `<Fragment>...</Fragment>`.\r\n- Watch out for possible \"wrong\" semicolons inside JSX elements.\r\n\r\n### Correctness and Safety\r\n\r\n- Don't assign a value to itself.\r\n- Don't return a value from a setter.\r\n- Don't compare expressions that modify string case with non-compliant values.\r\n- Don't use lexical declarations in switch clauses.\r\n- Don't use variables that haven't been declared in the document.\r\n- Don't write unreachable code.\r\n- Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.\r\n- Don't use control flow statements in finally blocks.\r\n- Don't use optional chaining where undefined values aren't allowed.\r\n- Don't have unused function parameters.\r\n- Don't have unused imports.\r\n- Don't have unused labels.\r\n- Don't have unused private class members.\r\n- Don't have unused variables.\r\n- Make sure void (self-closing) elements don't have children.\r\n- Don't return a value from a function with the return type 'void'\r\n- Use isNaN() when checking for NaN.\r\n- Make sure \"for\" loop update clauses move the counter in the right direction.\r\n- Make sure typeof expressions are compared to valid values.\r\n- Make sure generator functions contain yield.\r\n- Don't use await inside loops.\r\n- Don't use bitwise operators.\r\n- Don't use expressions where the operation doesn't change the value.\r\n- Make sure Promise-like statements are handled appropriately.\r\n- Don't use **dirname and **filename in the global scope.\r\n- Prevent import cycles.\r\n- Don't use configured elements.\r\n- Don't hardcode sensitive data like API keys and tokens.\r\n- Don't let variable declarations shadow variables from outer scopes.\r\n- Don't use the TypeScript directive @ts-ignore.\r\n- Prevent duplicate polyfills from Polyfill.io.\r\n- Don't use useless backreferences in regular expressions that always match empty strings.\r\n- Don't use unnecessary escapes in string literals.\r\n- Don't use useless undefined.\r\n- Make sure getters and setters for the same property are next to each other in class and object definitions.\r\n- Make sure object literals are declared consistently (defaults to explicit definitions).\r\n- Use static Response methods instead of new Response() constructor when possible.\r\n- Make sure switch-case statements are exhaustive.\r\n- Make sure the `preconnect` attribute is used when using Google Fonts.\r\n- Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.\r\n- Make sure iterable callbacks return consistent values.\r\n- Use `with { type: \"json\" }` for JSON module imports.\r\n- Use numeric separators in numeric literals.\r\n- Use object spread instead of `Object.assign()` when constructing new objects.\r\n- Always use the radix argument when using `parseInt()`.\r\n- Make sure JSDoc comment lines start with a single asterisk, except for the first one.\r\n- Include a description parameter for `Symbol()`.\r\n- Don't use spread (`...`) syntax on accumulators.\r\n- Don't use the `delete` operator.\r\n- Don't access namespace imports dynamically.\r\n- Don't use namespace imports.\r\n- Declare regex literals at the top level.\r\n- Don't use `target=\"_blank\"` without `rel=\"noopener\"`.\r\n\r\n### TypeScript Best Practices\r\n\r\n- Don't use TypeScript enums.\r\n- Don't export imported variables.\r\n- Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.\r\n- Don't use TypeScript namespaces.\r\n- Don't use non-null assertions with the `!` postfix operator.\r\n- Don't use parameter properties in class constructors.\r\n- Don't use user-defined types.\r\n- Use `as const` instead of literal types and type annotations.\r\n- Use either `T[]` or `Array<T>` consistently.\r\n- Initialize each enum member value explicitly.\r\n- Use `export type` for types.\r\n- Use `import type` for types.\r\n- Make sure all enum members are literal values.\r\n- Don't use TypeScript const enum.\r\n- Don't declare empty interfaces.\r\n- Don't let variables evolve into any type through reassignments.\r\n- Don't use the any type.\r\n- Don't misuse the non-null assertion operator (!) in TypeScript files.\r\n- Don't use implicit any type on variable declarations.\r\n- Don't merge interfaces and classes unsafely.\r\n- Don't use overload signatures that aren't next to each other.\r\n- Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.\r\n\r\n### Style and Consistency\r\n\r\n- Don't use global `eval()`.\r\n- Don't use callbacks in asynchronous tests and hooks.\r\n- Don't use negation in `if` statements that have `else` clauses.\r\n- Don't use nested ternary expressions.\r\n- Don't reassign function parameters.\r\n- This rule lets you specify global variable names you don't want to use in your application.\r\n- Don't use specified modules when loaded by import or require.\r\n- Don't use constants whose value is the upper-case version of their name.\r\n- Use `String.slice()` instead of `String.substr()` and `String.substring()`.\r\n- Don't use template literals if you don't need interpolation or special-character handling.\r\n- Don't use `else` blocks when the `if` block breaks early.\r\n- Don't use yoda expressions.\r\n- Don't use Array constructors.\r\n- Use `at()` instead of integer index access.\r\n- Follow curly brace conventions.\r\n- Use `else if` instead of nested `if` statements in `else` clauses.\r\n- Use single `if` statements instead of nested `if` clauses.\r\n- Use `new` for all builtins except `String`, `Number`, and `Boolean`.\r\n- Use consistent accessibility modifiers on class properties and methods.\r\n- Use `const` declarations for variables that are only assigned once.\r\n- Put default function parameters and optional function parameters last.\r\n- Include a `default` clause in switch statements.\r\n- Use the `**` operator instead of `Math.pow`.\r\n- Use `for-of` loops when you need the index to extract an item from the iterated array.\r\n- Use `node:assert/strict` over `node:assert`.\r\n- Use the `node:` protocol for Node.js builtin modules.\r\n- Use Number properties instead of global ones.\r\n- Use assignment operator shorthand where possible.\r\n- Use function types instead of object types with call signatures.\r\n- Use template literals over string concatenation.\r\n- Use `new` when throwing an error.\r\n- Don't throw non-Error values.\r\n- Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.\r\n- Use standard constants instead of approximated literals.\r\n- Don't assign values in expressions.\r\n- Don't use async functions as Promise executors.\r\n- Don't reassign exceptions in catch clauses.\r\n- Don't reassign class members.\r\n- Don't compare against -0.\r\n- Don't use labeled statements that aren't loops.\r\n- Don't use void type outside of generic or return types.\r\n- Don't use console.\r\n- Don't use control characters and escape sequences that match control characters in regular expression literals.\r\n- Don't use debugger.\r\n- Don't assign directly to document.cookie.\r\n- Use `===` and `!==`.\r\n- Don't use duplicate case labels.\r\n- Don't use duplicate class members.\r\n- Don't use duplicate conditions in if-else-if chains.\r\n- Don't use two keys with the same name inside objects.\r\n- Don't use duplicate function parameter names.\r\n- Don't have duplicate hooks in describe blocks.\r\n- Don't use empty block statements and static blocks.\r\n- Don't let switch clauses fall through.\r\n- Don't reassign function declarations.\r\n- Don't allow assignments to native objects and read-only global variables.\r\n- Use Number.isFinite instead of global isFinite.\r\n- Use Number.isNaN instead of global isNaN.\r\n- Don't assign to imported bindings.\r\n- Don't use irregular whitespace characters.\r\n- Don't use labels that share a name with a variable.\r\n- Don't use characters made with multiple code points in character class syntax.\r\n- Make sure to use new and constructor properly.\r\n- Don't use shorthand assign when the variable appears on both sides.\r\n- Don't use octal escape sequences in string literals.\r\n- Don't use Object.prototype builtins directly.\r\n- Don't redeclare variables, functions, classes, and types in the same scope.\r\n- Don't have redundant \"use strict\".\r\n- Don't compare things where both sides are exactly the same.\r\n- Don't let identifiers shadow restricted names.\r\n- Don't use sparse arrays (arrays with holes).\r\n- Don't use template literal placeholder syntax in regular strings.\r\n- Don't use the then property.\r\n- Don't use unsafe negation.\r\n- Don't use var.\r\n- Don't use with statements in non-strict contexts.\r\n- Make sure async functions actually use await.\r\n- Make sure default clauses in switch statements come last.\r\n- Make sure to pass a message value when creating a built-in error.\r\n- Make sure get methods always return a value.\r\n- Use a recommended display strategy with Google Fonts.\r\n- Make sure for-in loops include an if statement.\r\n- Use Array.isArray() instead of instanceof Array.\r\n- Make sure to use the digits argument with Number#toFixed().\r\n- Make sure to use the \"use strict\" directive in script files.\r\n\r\n### Next.js Specific Rules\r\n\r\n- Don't use `<img>` elements in Next.js projects.\r\n- Don't use `<head>` elements in Next.js projects.\r\n- Don't import next/document outside of pages/\\_document.jsx in Next.js projects.\r\n- Don't use the next/head module in pages/\\_document.js on Next.js projects.\r\n\r\n### Testing Best Practices\r\n\r\n- Don't use export or module.exports in test files.\r\n- Don't use focused tests.\r\n- Make sure the assertion function, like expect, is placed inside an it() function call.\r\n- Don't use disabled tests.\r\n\r\n## Common Tasks\r\n\r\n- `npx ultracite init` - Initialize Ultracite in your project\r\n- `npx ultracite format` - Format and fix code automatically\r\n- `npx ultracite lint` - Check for issues without fixing\r\n\r\n## Example: Error Handling\r\n\r\n```typescript\r\n// ✅ Good: Comprehensive error handling\r\ntry {\r\n  const result = await fetchData();\r\n  return { success: true, data: result };\r\n} catch (error) {\r\n  console.error(\"API call failed:\", error);\r\n  return { success: false, error: error.message };\r\n}\r\n\r\n// ❌ Bad: Swallowing errors\r\ntry {\r\n  return await fetchData();\r\n} catch (e) {\r\n  console.log(e);\r\n}\r\n```\n</yakaai_skills>"}