Skip to content

Commit

Permalink
lint(stories): disable temporarely & locally react-hooks/rules-of-hoo…
Browse files Browse the repository at this point in the history
…ks with todos
  • Loading branch information
ivangabriele committed Nov 13, 2024
1 parent c8339e3 commit 9a48fef
Show file tree
Hide file tree
Showing 41 changed files with 128 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stories/components/Banner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const Default: Story = {
>
<h2 style={{ color: THEME.color.white }}>This is a header</h2>
</div>
<Banner {...props} className="Banner-Storie" />
<Banner {...props} />
</Box>
)
}
Expand Down
3 changes: 3 additions & 0 deletions stories/components/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/components/SideMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { generateStoryDecorator } from '../../.storybook/utils/generateStoryDecorator'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/CheckPicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/CoordinatesInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Description } from '../../.storybook/components/Description'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/DateRangePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Description } from '../../.storybook/components/Description'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/MultiCascader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/MultiCheckbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/MultiRadio.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState, type FunctionComponent } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/MultiSelect.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/MultiZoneEditor.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/NumberInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/PhoneInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/RichBooleanCheckbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/Search.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/TextInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/Textarea.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/fields/Toggle.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { useState } from 'react'

import { Output } from '../../.storybook/components/Output'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikCheckPicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikCheckbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikCoordinatesInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikDatePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikDateRangePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikEffect.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Field, Formik } from 'formik'
import { useState } from 'react'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikMultiCascader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikMultiCheckbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikMultiRadio.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikMultiSelect.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikNumberInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikPhoneInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikRichBooleanCheckbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikSearch.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikSelect.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikTextInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikTextarea.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/formiks/FormikToggle.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { action } from '@storybook/addon-actions'
import { Formik } from 'formik'
import { omit } from 'lodash'
Expand Down
3 changes: 3 additions & 0 deletions stories/tables/SimpleTable.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { flexRender, getCoreRowModel, getSortedRowModel, type SortingState, useReactTable } from '@tanstack/react-table'
import { useVirtualizer } from '@tanstack/react-virtual'
import { useCallback, useMemo, useRef, useState } from 'react'
Expand Down
11 changes: 10 additions & 1 deletion stories/tables/TableWithSelectableRows.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-console, no-null/no-null */
// TODO Migrate this story to the new Storybook structure. Example: stories/components/Banner.stories.tsx.
/* eslint-disable react-hooks/rules-of-hooks */

import { flexRender, getCoreRowModel, getSortedRowModel, type SortingState, useReactTable } from '@tanstack/react-table'
import { useVirtualizer } from '@tanstack/react-virtual'
Expand All @@ -11,6 +12,7 @@ import { Link } from '../../src/icons'

import type { Meta } from '@storybook/react'

/* eslint-disable no-null/no-null */
const fakeData1 = Array(5).fill({
actionTaken: null,
controlUnitId: null,
Expand Down Expand Up @@ -85,6 +87,7 @@ const fakeData2 = Array(5).fill({
validityTime: 24,
vehicleType: 'VESSEL'
})
/* eslint-enable no-null/no-null */

const data = [...fakeData1, ...fakeData2]

Expand All @@ -100,7 +103,9 @@ export default meta

const ButtonsGroupRow = ({ id, onSelect }) => (
<ButtonsGroup>
{/* eslint-disable-next-line no-console */}
<IconButton accent={Accent.TERTIARY} Icon={Icon.Duplicate} onClick={() => console.log(id)} />
{/* eslint-disable-next-line no-console */}
<IconButton accent={Accent.TERTIARY} Icon={Icon.Edit} onClick={() => console.log(id)} />

<Dropdown accent={Accent.SECONDARY} Icon={Icon.More} onSelect={onSelect}>
Expand All @@ -116,8 +121,10 @@ export function _TableWithSelectableRows() {

const doAction = (key, id) => {
if (key === 'ARCHIVE') {
// eslint-disable-next-line no-console
console.log('we want to archive the reporting with id: ', id)
} else {
// eslint-disable-next-line no-console
console.log('we want to delete the reporting with id: ', id)
}
}
Expand All @@ -137,6 +144,7 @@ export function _TableWithSelectableRows() {
<TableWithSelectableRows.RowCheckbox
checked={table.getIsAllRowsSelected()}
indeterminate={(() => {
// eslint-disable-next-line no-console
console.log('indeterminate', table.getIsSomeRowsSelected())

return table.getIsSomeRowsSelected()
Expand Down Expand Up @@ -252,6 +260,7 @@ export function _TableWithSelectableRows() {
accent={Accent.TERTIARY}
Icon={Icon.FocusZones}
isCompact
// eslint-disable-next-line no-console
onClick={() => console.log(info.getValue())}
/>
),
Expand Down

0 comments on commit 9a48fef

Please sign in to comment.