diff --git a/package.json b/package.json index c5900080f69a4..8e17b0f1db6f9 100644 --- a/package.json +++ b/package.json @@ -144,15 +144,15 @@ "eslint-import-resolver-webpack": "^0.13.10", "eslint-plugin-consistent-default-export-name": "^0.0.15", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsdoc": "^50.6.14", + "eslint-plugin-jsdoc": "^50.7.1", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-material-ui": "workspace:^", "eslint-plugin-mocha": "^10.5.0", - "eslint-plugin-prettier": "^5.4.0", + "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-compiler": "19.0.0-beta-ebf51a3-20250411", "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-testing-library": "^7.2.2", + "eslint-plugin-testing-library": "^7.4.0", "fast-glob": "^3.3.3", "format-util": "^1.0.5", "fs-extra": "^11.3.0", diff --git a/packages/x-charts/src/internals/plugins/models/seriesConfig/colorProcessor.types.ts b/packages/x-charts/src/internals/plugins/models/seriesConfig/colorProcessor.types.ts index 1cdf2ab8dab99..e6b700ff98bb1 100644 --- a/packages/x-charts/src/internals/plugins/models/seriesConfig/colorProcessor.types.ts +++ b/packages/x-charts/src/internals/plugins/models/seriesConfig/colorProcessor.types.ts @@ -17,6 +17,11 @@ export type ColorGetter = TSeriesType exten /** * Transforms charts config to a color getter. * If dataIndex is not defined, it falls back to the series color. + * @param {DefaultizedSeriesType} series - The series configuration. + * @param {ComputedXAxis | undefined} xAxis - The computed x-axis configuration. + * @param {ComputedYAxis | undefined} yAxis - The computed y-axis configuration. + * @param {ZAxisDefaultized | undefined} zAxis - The defaulted z-axis configuration. + * @returns {ColorGetter} A function that takes a data index and returns a color string. */ export type ColorProcessor = ( series: DefaultizedSeriesType, diff --git a/packages/x-charts/src/internals/plugins/models/seriesConfig/tooltipGetter.types.ts b/packages/x-charts/src/internals/plugins/models/seriesConfig/tooltipGetter.types.ts index 385c50b535002..f71dfbc6c75e6 100644 --- a/packages/x-charts/src/internals/plugins/models/seriesConfig/tooltipGetter.types.ts +++ b/packages/x-charts/src/internals/plugins/models/seriesConfig/tooltipGetter.types.ts @@ -86,9 +86,10 @@ export type TooltipGetter = (params: { | null; /** - * Return an array of the axes that should trigger the tooltip. - * * If `axisId` is set to undefined, the default axis will be used. + * + * @param {Record>} series A map of series ID to their series configuration. + * @returns {{ direction: Directions; axisId: AxisId | undefined }[]} an array of the axes that should trigger the tooltip. */ export type AxisTooltipGetter< TSeriesType extends ChartSeriesType, diff --git a/packages/x-data-grid-pro/src/utils/tree/models.ts b/packages/x-data-grid-pro/src/utils/tree/models.ts index b9daf689647e8..a587deec8506f 100644 --- a/packages/x-data-grid-pro/src/utils/tree/models.ts +++ b/packages/x-data-grid-pro/src/utils/tree/models.ts @@ -13,6 +13,9 @@ export interface RowTreeBuilderNode { /** * Callback called when trying to insert a data row in the tree in place of an already existing data row. + * @param {GridRowId} firstId The id of the row that is already in the tree. + * @param {GridRowId} secondId The id of the row that is being inserted. + * @param {RowTreeBuilderGroupingCriterion[]} path The path of the row that is being inserted. */ export type GridTreePathDuplicateHandler = ( firstId: GridRowId, diff --git a/packages/x-data-grid/src/hooks/features/filter/gridFilterState.ts b/packages/x-data-grid/src/hooks/features/filter/gridFilterState.ts index 4a6fb5d892e67..7acbd0cf151e7 100644 --- a/packages/x-data-grid/src/hooks/features/filter/gridFilterState.ts +++ b/packages/x-data-grid/src/hooks/features/filter/gridFilterState.ts @@ -52,8 +52,9 @@ export interface GridAggregatedFilterItemApplierResult { } /** - * @param {GridRowId} rowId The id of the row we want to filter. + * @param {GridValidRowModel} row The model of the row we want to filter. * @param {(filterItem: GridFilterItem) => boolean} shouldApplyItem An optional callback to allow the filtering engine to only apply some items. + * @param {GridAggregatedFilterItemApplierResult} result The previous result of the filtering engine. */ export type GridAggregatedFilterItemApplier = ( row: GridValidRowModel, diff --git a/packages/x-data-grid/src/models/gridCellClass.ts b/packages/x-data-grid/src/models/gridCellClass.ts index 8dc1d9ce1f70d..d5eb3f4d01729 100644 --- a/packages/x-data-grid/src/models/gridCellClass.ts +++ b/packages/x-data-grid/src/models/gridCellClass.ts @@ -3,6 +3,8 @@ import { GridCellParams } from './params/gridCellParams'; /** * A function used to process cellClassName params. + * @param {GridCellParams} params The parameters of the cell. + * @returns {string} The class name to be added to the cell. */ export type GridCellClassFn = ( params: GridCellParams, diff --git a/packages/x-data-grid/src/models/gridColumnGrouping.ts b/packages/x-data-grid/src/models/gridColumnGrouping.ts index 1b15efbda2f39..e2a415f096c2d 100644 --- a/packages/x-data-grid/src/models/gridColumnGrouping.ts +++ b/packages/x-data-grid/src/models/gridColumnGrouping.ts @@ -13,6 +13,8 @@ export function isLeaf(node: GridColumnNode): node is GridLeafColumn { /** * A function used to process headerClassName params. + * @param {GridColumnGroupHeaderParams} params The parameters of the column group header. + * @returns {string} The class name to be added to the column group header cell. */ export type GridColumnGroupHeaderClassFn = (params: GridColumnGroupHeaderParams) => string; diff --git a/packages/x-data-grid/src/models/gridColumnHeaderClass.ts b/packages/x-data-grid/src/models/gridColumnHeaderClass.ts index 48ce233b5324e..f1f6a77088d2c 100644 --- a/packages/x-data-grid/src/models/gridColumnHeaderClass.ts +++ b/packages/x-data-grid/src/models/gridColumnHeaderClass.ts @@ -2,6 +2,8 @@ import { GridColumnHeaderParams } from './params/gridColumnHeaderParams'; /** * A function used to process headerClassName params. + * @param {GridColumnHeaderParams} params The parameters of the column header. + * @returns {string} The class name to be added to the column header cell. */ export type GridColumnHeaderClassFn = (params: GridColumnHeaderParams) => string; diff --git a/packages/x-data-grid/src/models/gridRows.ts b/packages/x-data-grid/src/models/gridRows.ts index f7282e9c59a12..1aa4afe8d9f5b 100644 --- a/packages/x-data-grid/src/models/gridRows.ts +++ b/packages/x-data-grid/src/models/gridRows.ts @@ -208,6 +208,8 @@ export interface GridRowEntry { /** * The function to retrieve the id of a [[GridRowModel]]. + * @param {R} row The row model. + * @returns {GridRowId} The id of the row. */ export type GridRowIdGetter = ( row: R, diff --git a/packages/x-data-grid/src/models/gridSortModel.ts b/packages/x-data-grid/src/models/gridSortModel.ts index 655c1650dce8b..2c4a1c4563e7e 100644 --- a/packages/x-data-grid/src/models/gridSortModel.ts +++ b/packages/x-data-grid/src/models/gridSortModel.ts @@ -12,6 +12,11 @@ export interface GridSortCellParams { /** * The type of the sort comparison function. + * @param {V} v1 The first value to compare. + * @param {V} v2 The second value to compare. + * @param {GridSortCellParams} cellParams1 The parameters of the first cell. + * @param {GridSortCellParams} cellParams2 The parameters of the second cell. + * @returns {number} The result of the comparison. */ export type GridComparatorFn = ( v1: V, diff --git a/packages/x-tree-view/src/internals/utils/selectors.ts b/packages/x-tree-view/src/internals/utils/selectors.ts index 73cb00c366ade..cf3208aa62e26 100644 --- a/packages/x-tree-view/src/internals/utils/selectors.ts +++ b/packages/x-tree-view/src/internals/utils/selectors.ts @@ -16,6 +16,8 @@ const cache = new WeakMap< /** * Type of a selector that take the whole tree view state as input and returns a value based on a required plugin. + * @param {TreeViewState} state The state of the Tree View. + * @returns {any | undefined} The value of the plugin state. */ export type TreeViewRootSelector< TSignature extends TreeViewAnyPluginSignature, @@ -31,6 +33,9 @@ export type TreeViewRootSelector< /** * Type of a selector that take the whole tree view state as input and returns a value based on an optional plugin. + * + * @param {TreeViewState} state The state of the Tree View. + * @returns {any | undefined} The value of the plugin state or undefined if the plugin is not registered. */ export type TreeViewRootSelectorForOptionalPlugin = < TSignatures extends [], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15526fc6503be..5c0b339ef1e7a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -254,8 +254,8 @@ importers: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.33.0(eslint@9.28.0)(typescript@5.8.3))(eslint-import-resolver-webpack@0.13.10)(eslint@9.28.0) eslint-plugin-jsdoc: - specifier: ^50.6.14 - version: 50.6.14(eslint@9.28.0) + specifier: ^50.7.1 + version: 50.7.1(eslint@9.28.0) eslint-plugin-jsx-a11y: specifier: ^6.10.2 version: 6.10.2(eslint@9.28.0) @@ -266,8 +266,8 @@ importers: specifier: ^10.5.0 version: 10.5.0(eslint@9.28.0) eslint-plugin-prettier: - specifier: ^5.4.0 - version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3) + specifier: ^5.4.1 + version: 5.4.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3) eslint-plugin-react: specifier: ^7.37.5 version: 7.37.5(eslint@9.28.0) @@ -278,8 +278,8 @@ importers: specifier: ^5.2.0 version: 5.2.0(eslint@9.28.0) eslint-plugin-testing-library: - specifier: ^7.2.2 - version: 7.2.2(eslint@9.28.0)(typescript@5.8.3) + specifier: ^7.4.0 + version: 7.4.0(eslint@9.28.0)(typescript@5.8.3) fast-glob: specifier: ^3.3.3 version: 3.3.3 @@ -3118,9 +3118,9 @@ packages: '@emotion/weak-memoize@0.4.0': resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} - '@es-joy/jsdoccomment@0.49.0': - resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} - engines: {node: '>=16'} + '@es-joy/jsdoccomment@0.50.2': + resolution: {integrity: sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==} + engines: {node: '>=18'} '@esbuild/aix-ppc64@0.25.4': resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} @@ -4595,8 +4595,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.2.1': - resolution: {integrity: sha512-VzgHzGblFmUeBmmrk55zPyrQIArQN4vujc9shWytaPdB3P7qhi0cpaiKIr7tlCmFv2lYUwnLospIqjL9ZSAhhg==} + '@pkgr/core@0.2.7': + resolution: {integrity: sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} '@playwright/test@1.52.0': @@ -7435,8 +7435,8 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jsdoc@50.6.14: - resolution: {integrity: sha512-JUudvooQbUx3iB8n/MzXMOV/VtaXq7xL4CeXhYryinr8osck7nV6fE2/xUXTiH3epPXcvq6TE3HQfGQuRHErTQ==} + eslint-plugin-jsdoc@50.7.1: + resolution: {integrity: sha512-XBnVA5g2kUVokTNUiE1McEPse5n9/mNUmuJcx52psT6zBs2eVcXSmQBvjfa7NZdfLVSy3u1pEDDUxoxpwy89WA==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -7453,8 +7453,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-prettier@5.4.0: - resolution: {integrity: sha512-BvQOvUhkVQM1i63iMETK9Hjud9QhqBnbtT1Zc642p9ynzBuCe5pybkOnvqZIBypXmMlsGcnU4HZ8sCTPfpAexA==} + eslint-plugin-prettier@5.4.1: + resolution: {integrity: sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -7485,8 +7485,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-testing-library@7.2.2: - resolution: {integrity: sha512-PaE4gwP3tMhmlcpOV0Hl21BA5SZIz3PiQYSgnHOY4rrSWZV4+r2BwbzUt2yU0xay2GtA+VNJxzKCbNMvEG2Uig==} + eslint-plugin-testing-library@7.4.0: + resolution: {integrity: sha512-rmryGUowFYlljNrN/sPjSfp4uZr6gIsiTHUeFg45xNwhWzgr+izRzOanrvd28XVlVmXlBpZdJGu+aHFUBBQatA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0, pnpm: ^9.14.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -11387,8 +11387,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.11.3: - resolution: {integrity: sha512-szhWDqNNI9etJUvbZ1/cx1StnZx8yMmFxme48SwR4dty4ioSY50KEZlpv0qAfgc1fpRzuh9hBXEzoCpJ779dLg==} + synckit@0.11.8: + resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==} engines: {node: ^14.18.0 || >=16.0.0} tabbable@6.2.0: @@ -14049,8 +14049,10 @@ snapshots: '@emotion/weak-memoize@0.4.0': {} - '@es-joy/jsdoccomment@0.49.0': + '@es-joy/jsdoccomment@0.50.2': dependencies: + '@types/estree': 1.0.7 + '@typescript-eslint/types': 8.33.0 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 4.1.0 @@ -15578,7 +15580,7 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.2.1': {} + '@pkgr/core@0.2.7': {} '@playwright/test@1.52.0': dependencies: @@ -18944,9 +18946,9 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsdoc@50.6.14(eslint@9.28.0): + eslint-plugin-jsdoc@50.7.1(eslint@9.28.0): dependencies: - '@es-joy/jsdoccomment': 0.49.0 + '@es-joy/jsdoccomment': 0.50.2 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.4.1(supports-color@8.1.1) @@ -18986,12 +18988,12 @@ snapshots: globals: 13.24.0 rambda: 7.5.0 - eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3): + eslint-plugin-prettier@5.4.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3): dependencies: eslint: 9.28.0 prettier: 3.5.3 prettier-linter-helpers: 1.0.0 - synckit: 0.11.3 + synckit: 0.11.8 optionalDependencies: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.5(eslint@9.28.0) @@ -19034,7 +19036,7 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-testing-library@7.2.2(eslint@9.28.0)(typescript@5.8.3): + eslint-plugin-testing-library@7.4.0(eslint@9.28.0)(typescript@5.8.3): dependencies: '@typescript-eslint/scope-manager': 8.33.0 '@typescript-eslint/utils': 8.33.0(eslint@9.28.0)(typescript@5.8.3) @@ -23720,10 +23722,9 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.11.3: + synckit@0.11.8: dependencies: - '@pkgr/core': 0.2.1 - tslib: 2.8.1 + '@pkgr/core': 0.2.7 tabbable@6.2.0: {}