mirror of
https://github.com/stablyai/orca.git
synced 2026-09-21 16:02:20 +00:00
fix(lint): preserve TaskPage effect suppressions after split
This commit is contained in:
@@ -24,6 +24,13 @@ export const OXLINT_SCANS = [
|
||||
]
|
||||
|
||||
const SUPPRESSED_REACT_DOCTOR_DIAGNOSTICS = new Map([
|
||||
[
|
||||
'react-doctor(no-adjust-state-on-prop-change)',
|
||||
new Set([
|
||||
'src/renderer/src/components/use-task-page-github-issue-draft.ts',
|
||||
'src/renderer/src/components/use-task-page-jira-creation-state.ts'
|
||||
])
|
||||
],
|
||||
[
|
||||
'react-doctor(no-derived-state-effect)',
|
||||
new Set([
|
||||
|
||||
@@ -310,6 +310,15 @@
|
||||
"react-doctor/no-derived-state-effect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"src/renderer/src/components/use-task-page-github-issue-draft.ts",
|
||||
"src/renderer/src/components/use-task-page-jira-creation-state.ts"
|
||||
],
|
||||
"rules": [
|
||||
"react-doctor/no-adjust-state-on-prop-change"
|
||||
]
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"src/renderer/src/components/editor/combined-diff/browse-files/use-combined-diff-tree-navigation.ts",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* oxlint-disable react-doctor/no-adjust-state-on-prop-change -- Why: repo selection and session-only draft persistence intentionally synchronize dialog state from external cache/session state. */
|
||||
import type { TaskPageGitHubCacheReconciliationModel } from './use-task-page-github-cache-reconciliation'
|
||||
import { useState, useMemo, useEffect } from 'react'
|
||||
import type { GitHubAssignableUser } from '../../../shared/github/pull-request-types'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* oxlint-disable react-doctor/no-adjust-state-on-prop-change -- Why: provider runtime changes intentionally clear stale Jira/Linear composer state. */
|
||||
import type { TaskPageGitHubMutationStateModel } from './use-task-page-github-mutation-state'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
import type { JiraIssueType, JiraCreateField } from '../../../shared/jira-types'
|
||||
@@ -49,6 +48,7 @@ export function useTaskPageJiraCreationStatePrelude(model: TaskPageGitHubMutatio
|
||||
writeDraft: writeNewJiraIssueDraft
|
||||
})
|
||||
const previousProviderRuntimeContextKeyRef = useRef(providerRuntimeContextKey)
|
||||
// Why: provider changes must clear dependent composer state before stale values can be submitted.
|
||||
useEffect(() => {
|
||||
if (previousProviderRuntimeContextKeyRef.current === providerRuntimeContextKey) {
|
||||
return
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* oxlint-disable react-doctor/no-adjust-state-on-prop-change, react-doctor/no-derived-state-effect -- Why: provider metadata and runtime IPC intentionally reset and hydrate dependent composer state. */
|
||||
import type { TaskPageJiraListProjectionModel } from './use-task-page-jira-list-projection'
|
||||
import { useState, useMemo, useEffect, type SetStateAction } from 'react'
|
||||
import { useTeamMembers, useTeamLabels, useTeamStates } from '@/hooks/useIssueMetadata'
|
||||
|
||||
Reference in New Issue
Block a user