Skip to content

Commit dfc2f85

Browse files
committed
Rename propDocBlockHandler to propDocblockHandler
1 parent 98a1138 commit dfc2f85

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.changeset/gentle-plants-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-docgen': major
3+
---
4+
5+
Rename `propDocBlockHandler` to `propDocblockHandler` for consistency

packages/react-docgen/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
contextTypeHandler,
1010
defaultPropsHandler,
1111
displayNameHandler,
12-
propDocBlockHandler,
12+
propDocblockHandler,
1313
propTypeCompositionHandler,
1414
propTypeHandler,
1515
} from './handlers/index.js';
@@ -52,7 +52,7 @@ export const defaultHandlers: Handler[] = [
5252
contextTypeHandler,
5353
childContextTypeHandler,
5454
propTypeCompositionHandler,
55-
propDocBlockHandler,
55+
propDocblockHandler,
5656
codeTypeHandler,
5757
defaultPropsHandler,
5858
componentDocblockHandler,

packages/react-docgen/src/handlers/componentMethodsJsDocHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function merge<T, U>(obj1: T, obj2: U): (T & U) | null {
2929
const componentMethodsJsDocHandler: Handler = function (
3030
documentation: Documentation,
3131
): void {
32-
let methods = documentation.get('methods') as MethodDescriptor[] | null;
32+
let methods = documentation.get<MethodDescriptor[]>('methods');
3333

3434
if (!methods) {
3535
return;

packages/react-docgen/src/handlers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export { default as componentMethodsJsDocHandler } from './componentMethodsJsDoc
88
export { default as defaultPropsHandler } from './defaultPropsHandler.js';
99
export { default as displayNameHandler } from './displayNameHandler.js';
1010
export { default as codeTypeHandler } from './codeTypeHandler.js';
11-
export { default as propDocBlockHandler } from './propDocBlockHandler.js';
11+
export { default as propDocblockHandler } from './propDocblockHandler.js';
1212
export { default as propTypeCompositionHandler } from './propTypeCompositionHandler.js';
1313
export {
1414
propTypeHandler,

packages/react-docgen/src/handlers/propDocBlockHandler.ts renamed to packages/react-docgen/src/handlers/propDocblockHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function resolveDocumentation(
2929
});
3030
}
3131

32-
const propDocBlockHandler: Handler = function (
32+
const propDocblockHandler: Handler = function (
3333
documentation: Documentation,
3434
componentDefinition: NodePath<ComponentNode>,
3535
): void {
@@ -49,4 +49,4 @@ const propDocBlockHandler: Handler = function (
4949
resolveDocumentation(documentation, propTypesPath);
5050
};
5151

52-
export default propDocBlockHandler;
52+
export default propDocblockHandler;

0 commit comments

Comments
 (0)