Fix prefer-const lint errors
- Change let to const for newTools variables in ToolsEditor and create-order-dialog Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
86fe36b544
commit
d0a5a4ab02
|
|
@ -132,7 +132,7 @@ export function ToolsEditor({ tools, onSave, isEditable, isSaving = false }: Too
|
|||
setSelectedTools((prev) => {
|
||||
if (prev.includes(tool)) {
|
||||
// Removing a tool - also remove tools that depend on it
|
||||
let newTools = prev.filter((t) => t !== tool)
|
||||
const newTools = prev.filter((t) => t !== tool)
|
||||
// If removing gitea, also remove gitea-drone
|
||||
if (tool === 'gitea') {
|
||||
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
||||
|
|
@ -140,7 +140,7 @@ export function ToolsEditor({ tools, onSave, isEditable, isSaving = false }: Too
|
|||
return newTools
|
||||
} else {
|
||||
// Adding a tool - also add its dependencies
|
||||
let newTools = [...prev, tool]
|
||||
const newTools = [...prev, tool]
|
||||
const deps = TOOL_DEPENDENCIES[tool]
|
||||
if (deps) {
|
||||
deps.forEach((dep) => {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ export function CreateOrderDialog({
|
|||
setSelectedTools((prev) => {
|
||||
if (prev.includes(tool)) {
|
||||
// Removing a tool - also remove tools that depend on it
|
||||
let newTools = prev.filter((t) => t !== tool)
|
||||
const newTools = prev.filter((t) => t !== tool)
|
||||
// If removing gitea, also remove gitea-drone
|
||||
if (tool === 'gitea') {
|
||||
newTools = newTools.filter((t) => t !== 'gitea-drone')
|
||||
|
|
@ -250,7 +250,7 @@ export function CreateOrderDialog({
|
|||
return newTools
|
||||
} else {
|
||||
// Adding a tool - also add its dependencies
|
||||
let newTools = [...prev, tool]
|
||||
const newTools = [...prev, tool]
|
||||
const deps = TOOL_DEPENDENCIES[tool]
|
||||
if (deps) {
|
||||
deps.forEach((dep) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue