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:
Alem Tuzlak
2026-04-10 12:38:43 +02:00
parent 445057aa06
commit ff2093102c
52 changed files with 138 additions and 126 deletions
+1 -1
View File
@@ -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 });