Conversation
|
Diff Coverage: The code coverage on the diff in this pull request is 74.4%. Total Coverage: This PR will decrease coverage by 0.75%. File Coverage Changes
🛟 Help
|
❌ 40 blocking issues (40 total)
|
src/components/TableToolsTable/components/ComposableTable/hooks/useTableToolsForComposable.js
Show resolved
Hide resolved
| * but eventually we will want to make the returns of it and it's hooks less aligned with any specific variant and | ||
| * try to make as generic as possible and have an adapter hook like this that will specifics to the return. | ||
| * | ||
| * @param {object} [options] AsyncTableTools options |
There was a problem hiding this comment.
Found 11 issues:
1. Missing @param "options.toolbarProps.pagination" [eslint:jsdoc/check-param-names]
2. Missing @param "options.loading" [eslint:jsdoc/check-param-names]
3. Missing @param "options.tableProps" [eslint:jsdoc/check-param-names]
4. Missing @param "options.tableProps.cells" [eslint:jsdoc/check-param-names]
5. Missing @param "options.tableProps.rows" [eslint:jsdoc/check-param-names]
6. Missing @param "options.tableProps.tableTree" [eslint:jsdoc/check-param-names]
7. Missing @param "options.toolbarProps" [eslint:jsdoc/check-param-names]
8. Missing @param "options.bulkSelect" [eslint:jsdoc/check-param-names]
9. Missing @param "options.total" [eslint:jsdoc/check-param-names]
10. Missing @param "options.view" [eslint:jsdoc/check-param-names]
11. Missing @param "options.expandable" [eslint:jsdoc/check-param-names]
| * | ||
| * @param {object} [options] AsyncTableTools options | ||
| * | ||
| * @returns {object} |
There was a problem hiding this comment.
Missing JSDoc @returns description. [eslint:jsdoc/require-returns-description]
1e26ffd to
0cdabc3
Compare
|
|
||
| import Cell from './Cell'; | ||
|
|
||
| const TableBody = ({ total, columns, rows, bulkSelect, expandable }) => ( |
| ? { | ||
| expand: { | ||
| rowIndex: idx, | ||
| isExpanded: expandable.isExpanded(row?.item?.itemId), |
| expand: { | ||
| rowIndex: idx, | ||
| isExpanded: expandable.isExpanded(row?.item?.itemId), | ||
| onToggle: () => expandable.onToggle(row?.item?.itemId), |
| ? { | ||
| select: { | ||
| rowIndex: idx, | ||
| onSelect: () => bulkSelect.selectOne(row?.item), |
| select: { | ||
| rowIndex: idx, | ||
| onSelect: () => bulkSelect.selectOne(row?.item), | ||
| isSelected: bulkSelect.isItemSelected(row?.item?.itemId), |
src/components/TableToolsTable/components/ComposableTable/hooks/useTableToolsForComposable.js
Show resolved
Hide resolved
src/components/TableToolsTable/components/Table/hooks/useTableToolsForTable.js
Show resolved
Hide resolved
| * This hook is an adapter to put required props into the right place and | ||
| * form to be consumable by the ComposableTable components | ||
| * | ||
| * @param {object} [options] AsyncTableTools options |
There was a problem hiding this comment.
Expected @param names to be "tableToolsProps". Got "options". [eslint:jsdoc/check-param-names]
| * | ||
| * @param {object} [options] AsyncTableTools options | ||
| * | ||
| * @returns {object} |
There was a problem hiding this comment.
Missing JSDoc @returns description. [eslint:jsdoc/require-returns-description]
src/components/TableToolsTable/components/Table/hooks/useTableToolsForTable.js
Show resolved
Hide resolved
0cdabc3 to
3ed7ce9
Compare
src/components/TableToolsTable/components/ComposableTable/hooks/useTableToolsForComposable.js
Show resolved
Hide resolved
src/components/TableToolsTable/components/Table/hooks/useTableToolsForTable.js
Show resolved
Hide resolved
src/components/TableToolsTable/components/Table/hooks/useTableToolsForTable.js
Show resolved
Hide resolved
3ed7ce9 to
5c294ad
Compare
| @@ -1,23 +1,17 @@ | |||
| import React from 'react'; | |||
| import React, { useContext } from 'react'; | |||
There was a problem hiding this comment.
| import { TableContext } from '~/hooks/useTableContext/constants'; | ||
| import { TableStateProvider, FilterModal } from '~/components'; | ||
|
|
||
| import { variants, queryClient } from './constants'; |
There was a problem hiding this comment.
Found 2 issues:
1. 'queryClient' is defined but never used. [eslint:@typescript-eslint/no-unused-vars]
2. 'queryClient' is defined but never used. [eslint:no-unused-vars]
| import { variants, queryClient } from './constants'; | |
| import { variants } from './constants'; |
Remove unused variable 'queryClient'.
| /** | ||
| * This hook is an adapter to put required props into the right place and | ||
| * form to be consumable by the ComposableTable components | ||
| * | ||
| * @param {object} [options] AsyncTableTools options | ||
| * | ||
| * @returns {object} | ||
| * | ||
| * @group Hooks | ||
| * |
There was a problem hiding this comment.
Found 11 issues:
1. Missing JSDoc @param "options.bulkSelect" declaration. [eslint:jsdoc/require-param]
2. Missing JSDoc @param "options.expandable" declaration. [eslint:jsdoc/require-param]
3. Missing JSDoc @param "options.loading" declaration. [eslint:jsdoc/require-param]
4. Missing JSDoc @param "options.tableProps" declaration. [eslint:jsdoc/require-param]
5. Missing JSDoc @param "options.tableProps.cells" declaration. [eslint:jsdoc/require-param]
6. Missing JSDoc @param "options.tableProps.rows" declaration. [eslint:jsdoc/require-param]
7. Missing JSDoc @param "options.tableProps.tableTree" declaration. [eslint:jsdoc/require-param]
8. Missing JSDoc @param "options.toolbarProps" declaration. [eslint:jsdoc/require-param]
9. Missing JSDoc @param "options.toolbarProps.pagination" declaration. [eslint:jsdoc/require-param]
10. Missing JSDoc @param "options.total" declaration. [eslint:jsdoc/require-param]
11. Missing JSDoc @param "options.view" declaration. [eslint:jsdoc/require-param]
| /** | ||
| * This hook is an adapter to put required props into the right place and | ||
| * form to be consumable by the ComposableTable components | ||
| * | ||
| * @param {object} [options] AsyncTableTools options | ||
| * | ||
| * @returns {object} | ||
| * | ||
| * @group Hooks | ||
| * |
There was a problem hiding this comment.
Missing JSDoc @param "tableToolsProps" declaration. [eslint:jsdoc/require-param]
| * | ||
| */ | ||
| const useTableToolsForTable = (tableToolsProps) => { | ||
| const { loading, total, bulkSelect, toolbarProps, tableProps } = |
There was a problem hiding this comment.
Found 2 issues:
1. 'loading' is assigned a value but never used. [eslint:@typescript-eslint/no-unused-vars]
2. 'loading' is assigned a value but never used. [eslint:no-unused-vars]
| const { loading, total, bulkSelect, toolbarProps, tableProps } = | |
| const { total, bulkSelect, toolbarProps, tableProps } = |
Remove unused variable 'loading'.
No description provided.