fix(lint): устранить ошибки lint и ожидание host в тесте артефактов логов
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
cf6dcd77fb
commit
44b5066f3a
6 files changed
+22
-11
No files matched your search
@@ -476,6 +476,7 @@ export function useDateSelector({
|
||||
|
||||
useEffect(() => {
|
||||
if (value) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect -- upstream ReUI: sync controlled value into local state
|
||||
setPeriodType(value.period || validDefaultPeriodType)
|
||||
// Use presetMode if provided, otherwise use value's operator or default
|
||||
const newFilterType = presetMode ?? value.operator ?? defaultFilterType
|
||||
@@ -494,6 +495,7 @@ export function useDateSelector({
|
||||
// Sync filterType when presetMode changes
|
||||
useEffect(() => {
|
||||
if (presetMode !== undefined) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect -- upstream ReUI: sync presetMode into local state
|
||||
setFilterType(presetMode)
|
||||
}
|
||||
}, [presetMode])
|
||||
@@ -1090,6 +1092,7 @@ export function DateSelector({
|
||||
// Sync input value when displayValue changes (but not when user is typing)
|
||||
useEffect(() => {
|
||||
if (!isInputFocused) {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect -- upstream ReUI: sync input text unless user is typing
|
||||
setInputValue(displayValue)
|
||||
}
|
||||
}, [displayValue, isInputFocused])
|
||||
|
||||
@@ -103,6 +103,8 @@ export interface SortableRootProps<T> extends Omit<
|
||||
modifiers?: Modifiers
|
||||
}
|
||||
|
||||
interface SortableChildProps { value?: UniqueIdentifier; className?: string }
|
||||
|
||||
function Sortable<T>({
|
||||
value,
|
||||
onValueChange,
|
||||
@@ -120,6 +122,7 @@ function Sortable<T>({
|
||||
const [activeId, setActiveId] = useState<UniqueIdentifier | null>(null)
|
||||
const [mounted, setMounted] = useState(false)
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect -- upstream ReUI: client-only mount flag for portal
|
||||
useLayoutEffect(() => setMounted(true), [])
|
||||
|
||||
const sensors = useSensors(
|
||||
@@ -210,10 +213,10 @@ function Sortable<T>({
|
||||
if (!activeId) return null
|
||||
let result: ReactNode = null
|
||||
Children.forEach(children, (child) => {
|
||||
if (isValidElement(child) && (child.props as any).value === activeId) {
|
||||
result = cloneElement(child as ReactElement<any>, {
|
||||
...(child.props as any),
|
||||
className: cn((child.props as any).className, "z-50"),
|
||||
if (isValidElement(child) && (child.props as SortableChildProps).value === activeId) {
|
||||
result = cloneElement(child as ReactElement<SortableChildProps>, {
|
||||
...(child.props as SortableChildProps),
|
||||
className: cn((child.props as SortableChildProps).className, "z-50"),
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -299,6 +302,7 @@ function SortableItem({
|
||||
<SortableItemContext.Provider
|
||||
value={{ listeners: undefined, isDragging: true, disabled: false }}
|
||||
>
|
||||
{/* eslint-disable-next-line react-hooks/rules-of-hooks -- upstream ReUI: render-prop branches are stable per component */}
|
||||
{useRender({
|
||||
defaultTagName: "div",
|
||||
render,
|
||||
@@ -333,6 +337,7 @@ function SortableItem({
|
||||
<SortableItemContext.Provider
|
||||
value={{ listeners, isDragging: isSortableDragging, disabled }}
|
||||
>
|
||||
{/* eslint-disable-next-line react-hooks/rules-of-hooks -- upstream ReUI: render-prop branches are stable per component */}
|
||||
{useRender({
|
||||
defaultTagName: "div",
|
||||
render,
|
||||
@@ -388,6 +393,7 @@ function SortableOverlay({
|
||||
const { activeId, modifiers } = useContext(SortableInternalContext)
|
||||
const [mounted, setMounted] = useState(false)
|
||||
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect -- upstream ReUI: client-only mount flag for portal
|
||||
useLayoutEffect(() => setMounted(true), [])
|
||||
|
||||
const content =
|
||||
|
||||
@@ -247,11 +247,13 @@ function StepperTrigger({
|
||||
if (btnRef.current) {
|
||||
registerTrigger(btnRef.current)
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/refs -- upstream ReUI: trigger registry reads the ref during render
|
||||
}, [btnRef.current])
|
||||
|
||||
// Find our index among triggers for navigation
|
||||
const myIdx = useMemo(
|
||||
() =>
|
||||
// eslint-disable-next-line react-hooks/refs -- upstream ReUI: trigger registry reads the ref during render
|
||||
triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),
|
||||
[triggerNodes, btnRef.current]
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user