Skip to content

Commit

Permalink
Disable lint warnings for dependencies (#1889)
Browse files Browse the repository at this point in the history
* chore: update Storybook source path for local and prod environment

* fix: resolve linting errors

* fix: revert preview-head file change

---------

Co-authored-by: Julian Skinner <[email protected]>
  • Loading branch information
monicawheeler and kajabi-bot authored Jun 17, 2024
1 parent df98bb2 commit d28a6eb
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 0 deletions.
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

0 comments on commit d28a6eb

Please sign in to comment.