mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
chore(lint): add new oxlint rules and auto-fix violations
Enable stricter oxlint rules for better code health: - typescript/consistent-type-imports: enforce `import type` for type-only imports - typescript/no-import-type-side-effects: prefer top-level type imports - import/consistent-type-specifier-style: consistent type specifier placement - typescript/no-unnecessary-type-assertion: bump to error - react/self-closing-comp: enforce self-closing JSX components - unicorn/prefer-optional-catch-binding: drop unused catch params - eslint/no-useless-computed-key: simplify object keys - unicorn/prefer-string-slice: prefer .slice() over .substring() - unicorn/prefer-array-flat-map: prefer .flatMap() over .map().flat() All existing violations auto-fixed via oxlint --fix.
This commit is contained in:
@@ -110,7 +110,7 @@ function extractCodeRegions(
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
|
||||
if (/^```/.test(line.trimStart())) {
|
||||
if (line.trimStart().startsWith("```")) {
|
||||
if (inFencedBlock) {
|
||||
// End of fenced block
|
||||
regions.push({ text: blockLines.join("\n"), lineOffset: blockStart });
|
||||
|
||||
Reference in New Issue
Block a user