Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 61 additions & 0 deletions .changeset/oxlint-complexity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
'@tanstack/ai': patch
'@tanstack/ai-acp': patch
'@tanstack/ai-angular': patch
'@tanstack/ai-anthropic': patch
'@tanstack/ai-bedrock': patch
'@tanstack/ai-byteplus': patch
'@tanstack/ai-claude-code': patch
'@tanstack/ai-client': patch
'@tanstack/ai-code-mode': patch
'@tanstack/ai-code-mode-snippets': patch
'@tanstack/ai-codex': patch
'@tanstack/ai-cohere': patch
'@tanstack/ai-devtools-core': patch
'@tanstack/ai-durable-stream': patch
'@tanstack/ai-elevenlabs': patch
'@tanstack/ai-event-client': patch
'@tanstack/ai-fal': patch
'@tanstack/ai-gemini': patch
'@tanstack/ai-grok': patch
'@tanstack/ai-grok-build': patch
'@tanstack/ai-groq': patch
'@tanstack/ai-isolate-cloudflare': patch
'@tanstack/ai-isolate-daytona': patch
'@tanstack/ai-isolate-node': patch
'@tanstack/ai-isolate-quickjs': patch
'@tanstack/ai-isolate-quickjs-bun': patch
'@tanstack/ai-llmgateway': patch
'@tanstack/ai-lovable': patch
'@tanstack/ai-mcp': patch
'@tanstack/ai-memory': patch
'@tanstack/ai-mistral': patch
'@tanstack/ai-octane': patch
'@tanstack/ai-ollama': patch
'@tanstack/ai-openai': patch
'@tanstack/ai-opencode': patch
'@tanstack/ai-openrouter': patch
'@tanstack/ai-perplexity': patch
'@tanstack/ai-persistence': patch
'@tanstack/ai-preact': patch
'@tanstack/ai-react': patch
'@tanstack/ai-react-ui': patch
'@tanstack/ai-sandbox': patch
'@tanstack/ai-sandbox-cloudflare': patch
'@tanstack/ai-sandbox-daytona': patch
'@tanstack/ai-sandbox-docker': patch
'@tanstack/ai-sandbox-local-process': patch
'@tanstack/ai-sandbox-sprites': patch
'@tanstack/ai-sandbox-vercel': patch
'@tanstack/ai-solid': patch
'@tanstack/ai-solid-ui': patch
'@tanstack/ai-svelte': patch
'@tanstack/ai-utils': patch
'@tanstack/ai-vercel-gateway': patch
'@tanstack/ai-vertex': patch
'@tanstack/ai-vue': patch
'@tanstack/ai-vue-ui': patch
'@tanstack/openai-base': patch
---

Internal readability lint: cyclomatic complexity max 20, named compound `if`s (type-narrowing left as-is), no calls in `for...of`, comments at most 2 lines. No public API change.
36 changes: 33 additions & 3 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"plugins": [],
"jsPlugins": [
"eslint-plugin-unused-imports",
{ "name": "eslint-js", "specifier": "oxlint-plugin-eslint" }
{ "name": "eslint-js", "specifier": "oxlint-plugin-eslint" },
{
"name": "comment-limits",
"specifier": "./scripts/oxlint-max-comment-lines.js"
},
{
"name": "named-if",
"specifier": "./scripts/oxlint-named-if.js"
}
],
"categories": {
"correctness": "off"
Expand All @@ -18,7 +26,8 @@
"**/coverage/**",
"**/dist/**",
"**/snap/**",
"**/vite.config.*.timestamp-*.*"
"**/vite.config.*.timestamp-*.*",
"**/*.tsrx.d.ts"
],
"rules": {
"unused-imports/no-unused-imports": "warn"
Expand Down Expand Up @@ -242,8 +251,29 @@
{
"selector": "TSAsExpression > TSAsExpression[typeAnnotation.type='TSUnknownKeyword']",
"message": "Avoid `as unknown as <Type>` β€” it bypasses TS's structural overlap check. Prefer plain `as <Type>`, fix the root cause, or opt out with `// oxlint-disable-next-line eslint-js/no-restricted-syntax -- <reason>`."
},
{
"selector": "ForOfStatement[right.type='CallExpression']",
"message": "Do not call a function in `for...of`. Assign the iterable to a name first."
},
{
"selector": "ForOfStatement[right.type='ParenthesizedExpression'][right.expression.type='CallExpression']",
"message": "Do not call a function in `for...of`. Assign the iterable to a name first."
},
{
"selector": "ForInStatement[right.type='CallExpression']",
"message": "Do not call a function in `for...in`. Assign the object to a name first."
}
],
"complexity": [
"error",
{
"max": 20
}
]
],
"comment-limits/max-lines": "error",
"named-if/require-named-condition": "error",
"named-if/no-mechanical-name": "error"
},
"plugins": ["typescript"]
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:knip": "knip",
"test:docs": "tsx scripts/verify-links.ts",
"test:dts": "node scripts/scan-dangling-dts.mjs",
"test:maintainer": "vitest run --root scripts/maintainer && vitest run scripts/model-sync scripts/publish-staged-docs.test.ts",
"test:maintainer": "vitest run --root scripts/maintainer && vitest run scripts/model-sync scripts/publish-staged-docs.test.ts scripts/oxlint-named-if.test.ts scripts/oxlint-max-comment-lines.test.ts",
"maintainer:sweep": "tsx scripts/maintainer/sweep.ts",
"maintainer:scorecard": "tsx scripts/maintainer/scorecard.ts",
"test:kiira": "kiira check",
Expand Down
Loading
Loading