Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable lint warnings for dependencies #1889

Merged
merged 3 commits into from
Jun 17, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Drawer/Drawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
DRAWER_END_COLLAPSE,
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Drawer = ({
active,
children,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Input/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
INPUT_TYPE
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Input = React.forwardRef(({
autocomplete,
className,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Input/Input.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { SageTokens } from '../configs';
import { Input } from './Input';
import { Popover } from '../Popover';

/* eslint-disable no-console */

export default {
title: 'Sage/Input',
component: Input,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/PanelControls/PanelControls.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { Table } from '../Table';
import { getNews } from '../services/newsapi';
import { PanelControls } from './PanelControls';

/* eslint-disable react-hooks/exhaustive-deps */

// TODO: Consider how select all affects all items
// when only one page is currently selected

Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { TableRow } from './TableRow';
import { SELECTION_TYPES } from '../PanelControls/configs';
import { Checkbox } from '../Toggle';

/* eslint-disable react-hooks/exhaustive-deps */

//
// Tables are built out from a provided set of rows.
// These rows can be provided in a variety of formats,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Table/TableRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { cellPropTypes } from './configs';
import { TableHelpers } from '../helpers';
import { Checkbox } from '../Toggle';

/* eslint-disable react-hooks/exhaustive-deps */

export const TableRow = ({
className,
cells,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Toast/Toast.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { SageTokens } from '../configs';
import { Icon } from '../Icon';
import { TOAST_TYPES } from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

export const Toast = ({
className,
description,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Toggle/Switch.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { disableArgs, selectArgs } from '../story-support/helpers';
import { Switch } from './Switch';
import { Toggle } from './Toggle';

/* eslint-disable react/forbid-foreign-prop-types */

export default {
title: 'Sage/Switch',
component: Switch,
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Tooltip/TooltipElement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
TOOLTIP_POSITIONS
} from './configs';

/* eslint-disable react-hooks/exhaustive-deps */

const TOOLTIP_DISTANCE = 8;

export const TooltipElement = ({
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/Typeahead/Typeahead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Search } from '../Search';
import { useFocusTrap, useDebounceEffect } from '../common/hooks';
import { TypeaheadPanel } from './TypeaheadPanel';

/* eslint-disable react-hooks/exhaustive-deps */

const A11Y_ID = uuid();

export const Typeahead = ({
Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/common/hooks/useDebounceEffect.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useEffect, useCallback } from 'react';

/* eslint-disable react-hooks/exhaustive-deps */

export const useDebounceEffect = (effect, deps, delay = 250) => {
const callback = useCallback(effect, deps);

Expand Down
2 changes: 2 additions & 0 deletions packages/sage-react/lib/common/hooks/useFocusTrap.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useEffect } from 'react';
import { createFocusTrap } from 'focus-trap';

/* eslint-disable react-hooks/exhaustive-deps */

/**
*
* @param {Boolean} active - React boolean state
Expand Down
Loading