diff --git a/packages/ra-core/src/auth/useLogin.ts b/packages/ra-core/src/auth/useLogin.ts index 51bff88916b..6af8f2d8f0d 100644 --- a/packages/ra-core/src/auth/useLogin.ts +++ b/packages/ra-core/src/auth/useLogin.ts @@ -56,7 +56,7 @@ const useLogin = (): Login => { /** * Log a user in by calling the authProvider.login() method * - * @param {object} params Login parameters to pass to the authProvider. May contain username/email, password, etc + * @param {Object} params Login parameters to pass to the authProvider. May contain username/email, password, etc * @param {string} pathName The path to redirect to after login. By default, redirects to the home page, or to the last page visited after deconnexion. * * @return {Promise} The authProvider response diff --git a/packages/ra-core/src/controller/field/useReferenceManyFieldController.ts b/packages/ra-core/src/controller/field/useReferenceManyFieldController.ts index e8b60424b20..6be6c6e8845 100644 --- a/packages/ra-core/src/controller/field/useReferenceManyFieldController.ts +++ b/packages/ra-core/src/controller/field/useReferenceManyFieldController.ts @@ -72,7 +72,7 @@ const defaultFilter = {}; * @param {string} option.basePath basepath to current resource * @param {number} option.page the page number * @param {number} option.perPage the number of item per page - * @param {object} option.sort the sort to apply to the referenced records + * @param {Object} option.sort the sort to apply to the referenced records * * @returns {ReferenceManyProps} The reference many props */ diff --git a/packages/ra-core/src/controller/useListParams.ts b/packages/ra-core/src/controller/useListParams.ts index 4d11f70e564..d67aabbabd0 100644 --- a/packages/ra-core/src/controller/useListParams.ts +++ b/packages/ra-core/src/controller/useListParams.ts @@ -279,7 +279,7 @@ export const parseQueryFromLocation = ({ search }) => { * To check if the user has custom params, we must compare the params * to these initial values. * - * @param {object} params + * @param {Object} params */ export const hasCustomParams = (params: ListParams) => { return ( diff --git a/packages/ra-core/src/controller/usePaginationState.ts b/packages/ra-core/src/controller/usePaginationState.ts index 5690c6c08fc..45a0b6212a1 100644 --- a/packages/ra-core/src/controller/usePaginationState.ts +++ b/packages/ra-core/src/controller/usePaginationState.ts @@ -6,9 +6,9 @@ import { Pagination } from '../types'; * @type {Object} * @property {number} page: The page number. * @property {number} perPage: The number of item per page. - * @property {function} setPage: Set the page number - * @property {function} setPerPage: Set the per page number - * @property {function} setPagination: Set page and perPage pagination numbers + * @property {Function} setPage: Set the page number + * @property {Function} setPerPage: Set the per page number + * @property {Function} setPagination: Set page and perPage pagination numbers */ export interface PaginationProps { page: number; diff --git a/packages/ra-core/src/controller/useSortState.ts b/packages/ra-core/src/controller/useSortState.ts index e13ce87f320..a921ff06f77 100644 --- a/packages/ra-core/src/controller/useSortState.ts +++ b/packages/ra-core/src/controller/useSortState.ts @@ -75,7 +75,7 @@ export const defaultSort = { field: 'id', order: 'DESC' }; * @typedef SortProps * @type {Object} * @property {Object} sort: the sort object. - * @property {String} sort.field: the sort object. + * @property {string} sort.field: the sort object. * @property {'ASC' | 'DESC'} sort.order: the sort object. * @property {setSort} setSort * @property {setSortField} setSortField diff --git a/packages/ra-core/src/dataProvider/useQueryWithStore.ts b/packages/ra-core/src/dataProvider/useQueryWithStore.ts index cb662396daa..5e33134ee2a 100644 --- a/packages/ra-core/src/dataProvider/useQueryWithStore.ts +++ b/packages/ra-core/src/dataProvider/useQueryWithStore.ts @@ -70,8 +70,8 @@ const defaultTotalSelector = () => null; * @param {string} options.action Redux action type * @param {Function} options.onSuccess Side effect function to be executed upon success of failure, e.g. { onSuccess: response => refresh() } } * @param {Function} options.onFailure Side effect function to be executed upon failure, e.g. { onFailure: error => notify(error.message) } } - * @param {function} dataSelector Redux selector to get the result. Required. - * @param {function} totalSelector Redux selector to get the total (optional, only for LIST queries) + * @param {Function} dataSelector Redux selector to get the result. Required. + * @param {Function} totalSelector Redux selector to get the total (optional, only for LIST queries) * * @returns The current request state. Destructure as { data, total, error, loading, loaded }. * diff --git a/packages/ra-core/src/form/FormWithRedirect.tsx b/packages/ra-core/src/form/FormWithRedirect.tsx index 4e1f229d85a..0f15104bbce 100644 --- a/packages/ra-core/src/form/FormWithRedirect.tsx +++ b/packages/ra-core/src/form/FormWithRedirect.tsx @@ -22,10 +22,10 @@ import FormContext from './FormContext'; * /> * ); * - * @typedef {object} Props the props you can use (other props are injected by Create or Edit) - * @prop {object} initialValues - * @prop {function} validate - * @prop {function} save + * @typedef {Object} Props the props you can use (other props are injected by Create or Edit) + * @prop {Object} initialValues + * @prop {Function} validate + * @prop {Function} save * @prop {boolean} submitOnEnter * @prop {string} redirect * diff --git a/packages/ra-core/src/i18n/TranslationUtils.ts b/packages/ra-core/src/i18n/TranslationUtils.ts index 197c6afabff..b7c293ad562 100644 --- a/packages/ra-core/src/i18n/TranslationUtils.ts +++ b/packages/ra-core/src/i18n/TranslationUtils.ts @@ -26,7 +26,7 @@ interface AllNavigatorLanguage extends NavigatorLanguage { * * ); * - * @param {String} defaultLocale Defaults to 'en' + * @param {string} defaultLocale Defaults to 'en' */ export const resolveBrowserLocale = (defaultLocale = DEFAULT_LOCALE) => { // from http://blog.ksol.fr/user-locale-detection-browser-javascript/ diff --git a/packages/ra-core/src/inference/inferElementFromValues.tsx b/packages/ra-core/src/inference/inferElementFromValues.tsx index bb0c32075be..4f0361251da 100644 --- a/packages/ra-core/src/inference/inferElementFromValues.tsx +++ b/packages/ra-core/src/inference/inferElementFromValues.tsx @@ -71,8 +71,8 @@ const hasType = (type, types) => typeof types[type] !== 'undefined'; * ); * // null * - * @param {String} name Property name, e.g. 'date_of_birth' - * @param {[mixed]} values an array of values from which to determine the type, e.g. [12, 34.4, 43] + * @param {string} name Property name, e.g. 'date_of_birth' + * @param {any[]} values an array of values from which to determine the type, e.g. [12, 34.4, 43] * @param {Object} types A set of components indexed by type. The string type is the only required one * * @return InferredElement diff --git a/packages/ra-ui-materialui/src/form/SimpleForm.js b/packages/ra-ui-materialui/src/form/SimpleForm.js index e668ab02325..5126e11e3c9 100644 --- a/packages/ra-ui-materialui/src/form/SimpleForm.js +++ b/packages/ra-ui-materialui/src/form/SimpleForm.js @@ -29,10 +29,10 @@ import CardContentInner from '../layout/CardContentInner'; * * ); * - * @typedef {object} Props the props you can use (other props are injected by Create or Edit) + * @typedef {Object} Props the props you can use (other props are injected by Create or Edit) * @prop {ReactElement[]} children Input elements - * @prop {object} initialValues - * @prop {function} validate + * @prop {Object} initialValues + * @prop {Function} validate * @prop {boolean} submitOnEnter * @prop {string} redirect * @prop {ReactElement} toolbar The element displayed at the bottom of the form, contzining the SaveButton diff --git a/packages/ra-ui-materialui/src/form/TabbedForm.js b/packages/ra-ui-materialui/src/form/TabbedForm.js index c08a2feb19c..bf6c24e69f5 100644 --- a/packages/ra-ui-materialui/src/form/TabbedForm.js +++ b/packages/ra-ui-materialui/src/form/TabbedForm.js @@ -64,10 +64,10 @@ import TabbedFormTabs, { getTabFullPath } from './TabbedFormTabs'; * * ); * - * @typedef {object} Props the props you can use (other props are injected by Create or Edit) + * @typedef {Object} Props the props you can use (other props are injected by Create or Edit) * @prop {ReactElement[]} FormTab elements - * @prop {object} initialValues - * @prop {function} validate + * @prop {Object} initialValues + * @prop {Function} validate * @prop {boolean} submitOnEnter * @prop {string} redirect * @prop {ReactElement} toolbar The element displayed at the bottom of the form, contzining the SaveButton diff --git a/packages/ra-ui-materialui/src/layout/LinearProgress.js b/packages/ra-ui-materialui/src/layout/LinearProgress.js index 3ec1b2b492a..2822b0883e0 100644 --- a/packages/ra-ui-materialui/src/layout/LinearProgress.js +++ b/packages/ra-ui-materialui/src/layout/LinearProgress.js @@ -22,7 +22,7 @@ const useStyles = makeStyles( * @see ReferenceField * @see ReferenceInput * - * @param {object} classes CSS class names + * @param {Object} classes CSS class names */ const LinearProgress = props => { const { classes: classesOverride, className, ...rest } = props;