Skip to content

Commit

Permalink
second round of disabling rules on a per-line basis.
Browse files Browse the repository at this point in the history
  • Loading branch information
oatkiller committed Jun 4, 2020
1 parent 3e00900 commit 44fb7ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const Expressions: React.FC<Props> = (props) => {
timeUnit: timeUnit ?? defaultExpression.timeUnit,
});
setAlertParams('criteria', exp);
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [setAlertParams, alertParams.criteria, timeSize, timeUnit]);

const removeExpression = useCallback(
Expand All @@ -141,6 +142,7 @@ export const Expressions: React.FC<Props> = (props) => {
[derivedIndexPattern, setAlertParams]
);

/* eslint-disable-next-line react-hooks/exhaustive-deps */
const debouncedOnFilterChange = useCallback(debounce(onFilterChange, FILTER_TYPING_DEBOUNCE_MS), [
onFilterChange,
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const Editor: React.FC<Props> = (props) => {
} else {
return [];
}
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [sourceStatus]);

const updateCount = useCallback(
Expand Down Expand Up @@ -176,6 +177,7 @@ export const Editor: React.FC<Props> = (props) => {
? [...alertParams.criteria, DEFAULT_CRITERIA]
: [DEFAULT_CRITERIA];
setAlertParams('criteria', nextCriteria);
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [alertParams, setAlertParams]);

const removeCriterion = useCallback(
Expand All @@ -185,6 +187,7 @@ export const Editor: React.FC<Props> = (props) => {
});
setAlertParams('criteria', nextCriteria);
},
/* eslint-disable-next-line react-hooks/exhaustive-deps */
[alertParams, setAlertParams]
);

Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/infra/public/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ export const Header = ({ breadcrumbs = [], readOnlyBadge = false }: HeaderProps)

const setBreadcrumbs = useCallback(() => {
return chrome?.setBreadcrumbs(breadcrumbs || []);
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [breadcrumbs, chrome]);

const setBadge = useCallback(() => {
return chrome?.setBadge(badge);
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [badge, chrome]);

useEffect(() => {
Expand Down

0 comments on commit 44fb7ef

Please sign in to comment.