reactjs / react-docgen
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 80 files with 5,325 lines of code.
    • 0 very long files (0 lines of code)
    • 0 long files (0 lines of code)
    • 4 medium size files (1,198 lines of codeclsfd_ftr_w_mp_ins)
    • 14 small files (1,918 lines of code)
    • 62 very small files (2,209 lines of code)
0% | 0% | 22% | 36% | 41%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
ts0% | 0% | 21% | 38% | 40%
js0% | 0% | 39% | 23% | 36%
less0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src/utils0% | 0% | 31% | 31% | 37%
benchmark/fixtures0% | 0% | 100% | 0% | 0%
src/handlers0% | 0% | 0% | 35% | 64%
src/resolver0% | 0% | 0% | 79% | 20%
src0% | 0% | 0% | 49% | 50%
website/src/components0% | 0% | 0% | 52% | 47%
src/importer0% | 0% | 0% | 95% | 4%
website/src0% | 0% | 0% | 0% | 100%
benchmark0% | 0% | 0% | 0% | 100%
website0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
getTSType.ts
in src/utils
411 32
getFlowType.ts
in src/utils
359 26
getPropType.ts
in src/utils
224 10
CircularProgress.js
in benchmark/fixtures
204 5
194 1
resolveToValue.ts
in src/utils
192 4
172 4
defaultPropsHandler.ts
in src/handlers
151 5
148 9
134 4
126 5
App.js
in website/src/components
121 5
121 6
120 6
makeFsImporter.ts
in src/importer
119 8
109 5
parseJsDoc.ts
in src/utils
108 6
103 5
flowTypeHandler.ts
in src/handlers
100 2
96 4
propTypeHandler.ts
in src/handlers
96 3
react-docgen.less
in website/src
93 -
84 4
CodeMirrorPanel.js
in website/src/components
78 8
expressionTo.ts
in src/utils
72 2
72 2
67 2
62 2
displayNameHandler.ts
in src/handlers
61 1
60 3
parse.ts
in src
58 2
56 3
54 4
index.js
in benchmark
50 -
main.ts
in src
46 1
resolveToModule.ts
in src/utils
46 1
printValue.ts
in src/utils
45 3
45 2
45 2
42 1
propDocBlockHandler.ts
in src/handlers
42 2
getMembers.ts
in src/utils
41 2
docblock.ts
in src/utils
40 3
resolveHOC.ts
in src/utils
38 1
getPropertyName.ts
in src/utils
36 1
35 1
35 1
Header.js
in website/src/components
33 -
28 2
index.ts
in src/utils
28 -
Files With Most Units (Top 50)
File# lines# units
getTSType.ts
in src/utils
411 32
getFlowType.ts
in src/utils
359 26
getPropType.ts
in src/utils
224 10
148 9
CodeMirrorPanel.js
in website/src/components
78 8
makeFsImporter.ts
in src/importer
119 8
parseJsDoc.ts
in src/utils
108 6
121 6
120 6
CircularProgress.js
in benchmark/fixtures
204 5
App.js
in website/src/components
121 5
126 5
103 5
defaultPropsHandler.ts
in src/handlers
151 5
109 5
96 4
134 4
84 4
resolveToValue.ts
in src/utils
192 4
172 4
54 4
printValue.ts
in src/utils
45 3
docblock.ts
in src/utils
40 3
propTypeHandler.ts
in src/handlers
96 3
60 3
56 3
parse.ts
in src
58 2
expressionTo.ts
in src/utils
72 2
67 2
45 2
20 2
17 2
28 2
62 2
16 2
getMembers.ts
in src/utils
41 2
72 2
flowTypeHandler.ts
in src/handlers
100 2
propDocBlockHandler.ts
in src/handlers
42 2
45 2
ignoreImports.ts
in src/importer
3 1
main.ts
in src
46 1
match.ts
in src/utils
20 1
16 1
9 1
23 1
21 1
12 1
23 1
18 1
Files With Long Lines (Top 3)

There are 3 files with lines longer than 120 characters. In total, there are 4 long lines.

File# lines# units# long lines
index.html
in website/src
16 - 2
Header.js
in website/src/components
33 - 1
printValue.ts
in src/utils
45 3 1
Correlations

File Size vs. Commits (all time): 80 points

website/src/index.js x: 6 commits (all time) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 commits (all time) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 2 commits (all time) y: 42 lines of code src/utils/isReactComponentClass.ts x: 2 commits (all time) y: 62 lines of code src/utils/resolveToModule.ts x: 2 commits (all time) y: 46 lines of code src/utils/resolveToValue.ts x: 2 commits (all time) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 3 commits (all time) y: 126 lines of code src/utils/getPropType.ts x: 2 commits (all time) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 2 commits (all time) y: 103 lines of code src/utils/printValue.ts x: 2 commits (all time) y: 45 lines of code src/utils/parseJsDoc.ts x: 2 commits (all time) y: 108 lines of code src/utils/expressionTo.ts x: 2 commits (all time) y: 72 lines of code src/utils/resolveExportDeclaration.ts x: 2 commits (all time) y: 26 lines of code jest.config.js x: 1 commits (all time) y: 8 lines of code src/Documentation.ts x: 1 commits (all time) y: 194 lines of code src/babelParser.ts x: 1 commits (all time) y: 96 lines of code src/handlers/componentDocblockHandler.ts x: 1 commits (all time) y: 60 lines of code src/handlers/componentMethodsHandler.ts x: 1 commits (all time) y: 109 lines of code src/handlers/componentMethodsJsDocHandler.ts x: 1 commits (all time) y: 45 lines of code src/handlers/defaultPropsHandler.ts x: 1 commits (all time) y: 151 lines of code src/handlers/flowTypeHandler.ts x: 1 commits (all time) y: 100 lines of code src/handlers/propDocBlockHandler.ts x: 1 commits (all time) y: 42 lines of code src/handlers/propTypeCompositionHandler.ts x: 1 commits (all time) y: 56 lines of code src/importer/ignoreImports.ts x: 1 commits (all time) y: 3 lines of code src/importer/makeFsImporter.ts x: 1 commits (all time) y: 119 lines of code src/main.ts x: 1 commits (all time) y: 46 lines of code src/parse.ts x: 1 commits (all time) y: 58 lines of code src/resolver/findAllComponentDefinitions.ts x: 1 commits (all time) y: 54 lines of code src/resolver/findAllExportedComponentDefinitions.ts x: 1 commits (all time) y: 121 lines of code src/utils/docblock.ts x: 1 commits (all time) y: 40 lines of code src/utils/flowUtilityTypes.ts x: 1 commits (all time) y: 16 lines of code src/utils/getClassMemberValuePath.ts x: 1 commits (all time) y: 18 lines of code src/utils/getFlowType.ts x: 1 commits (all time) y: 359 lines of code src/utils/getFlowTypeFromReactComponent.ts x: 1 commits (all time) y: 134 lines of code src/utils/getMemberExpressionRoot.ts x: 1 commits (all time) y: 10 lines of code src/utils/getMemberExpressionValuePath.ts x: 1 commits (all time) y: 84 lines of code src/utils/getMemberValuePath.ts x: 1 commits (all time) y: 67 lines of code src/utils/getMethodDocumentation.ts x: 1 commits (all time) y: 148 lines of code src/utils/getParameterName.ts x: 1 commits (all time) y: 21 lines of code src/utils/getPropertyName.ts x: 1 commits (all time) y: 36 lines of code src/utils/getTSType.ts x: 1 commits (all time) y: 411 lines of code src/utils/getTypeAnnotation.ts x: 1 commits (all time) y: 17 lines of code src/utils/getTypeParameters.ts x: 1 commits (all time) y: 35 lines of code src/utils/index.ts x: 1 commits (all time) y: 28 lines of code src/utils/isExportsOrModuleAssignment.ts x: 1 commits (all time) y: 23 lines of code src/utils/isReactCloneElementCall.ts x: 1 commits (all time) y: 9 lines of code src/utils/isReactModuleName.ts x: 1 commits (all time) y: 12 lines of code src/utils/isStatelessComponent.ts x: 1 commits (all time) y: 172 lines of code src/utils/normalizeClassDefinition.ts x: 1 commits (all time) y: 72 lines of code src/utils/resolveHOC.ts x: 1 commits (all time) y: 38 lines of code src/utils/traverse.ts x: 1 commits (all time) y: 27 lines of code website/babel.config.js x: 2 commits (all time) y: 9 lines of code benchmark/index.js x: 3 commits (all time) y: 50 lines of code website/src/components/CodeMirrorPanel.js x: 1 commits (all time) y: 78 lines of code website/src/components/Header.js x: 1 commits (all time) y: 33 lines of code website/src/index.html x: 3 commits (all time) y: 16 lines of code website/src/react-docgen.less x: 2 commits (all time) y: 93 lines of code benchmark/fixtures/CircularProgress.js x: 1 commits (all time) y: 204 lines of code
411.0
lines of code
  min: 3.0
  average: 66.56
  25th percentile: 17.25
  median: 42.0
  75th percentile: 96.0
  max: 411.0
0 6.0
commits (all time)
min: 1.0 | average: 1.29 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 6.0

File Size vs. Contributors (all time): 80 points

website/src/index.js x: 3 contributors (all time) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 contributors (all time) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 2 contributors (all time) y: 42 lines of code src/utils/isReactComponentClass.ts x: 2 contributors (all time) y: 62 lines of code src/utils/resolveToModule.ts x: 2 contributors (all time) y: 46 lines of code src/utils/resolveToValue.ts x: 2 contributors (all time) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 2 contributors (all time) y: 126 lines of code src/utils/getPropType.ts x: 2 contributors (all time) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 2 contributors (all time) y: 103 lines of code src/utils/printValue.ts x: 2 contributors (all time) y: 45 lines of code src/utils/parseJsDoc.ts x: 2 contributors (all time) y: 108 lines of code src/utils/expressionTo.ts x: 2 contributors (all time) y: 72 lines of code src/utils/resolveExportDeclaration.ts x: 2 contributors (all time) y: 26 lines of code jest.config.js x: 1 contributors (all time) y: 8 lines of code src/Documentation.ts x: 1 contributors (all time) y: 194 lines of code src/babelParser.ts x: 1 contributors (all time) y: 96 lines of code src/handlers/componentDocblockHandler.ts x: 1 contributors (all time) y: 60 lines of code src/handlers/componentMethodsHandler.ts x: 1 contributors (all time) y: 109 lines of code src/handlers/componentMethodsJsDocHandler.ts x: 1 contributors (all time) y: 45 lines of code src/handlers/defaultPropsHandler.ts x: 1 contributors (all time) y: 151 lines of code src/handlers/flowTypeHandler.ts x: 1 contributors (all time) y: 100 lines of code src/handlers/propDocBlockHandler.ts x: 1 contributors (all time) y: 42 lines of code src/handlers/propTypeCompositionHandler.ts x: 1 contributors (all time) y: 56 lines of code src/importer/ignoreImports.ts x: 1 contributors (all time) y: 3 lines of code src/importer/makeFsImporter.ts x: 1 contributors (all time) y: 119 lines of code src/main.ts x: 1 contributors (all time) y: 46 lines of code src/parse.ts x: 1 contributors (all time) y: 58 lines of code src/resolver/findAllComponentDefinitions.ts x: 1 contributors (all time) y: 54 lines of code src/resolver/findAllExportedComponentDefinitions.ts x: 1 contributors (all time) y: 121 lines of code src/utils/docblock.ts x: 1 contributors (all time) y: 40 lines of code src/utils/flowUtilityTypes.ts x: 1 contributors (all time) y: 16 lines of code src/utils/getClassMemberValuePath.ts x: 1 contributors (all time) y: 18 lines of code src/utils/getFlowType.ts x: 1 contributors (all time) y: 359 lines of code src/utils/getFlowTypeFromReactComponent.ts x: 1 contributors (all time) y: 134 lines of code src/utils/getMemberExpressionRoot.ts x: 1 contributors (all time) y: 10 lines of code src/utils/getMemberExpressionValuePath.ts x: 1 contributors (all time) y: 84 lines of code src/utils/getMemberValuePath.ts x: 1 contributors (all time) y: 67 lines of code src/utils/getMethodDocumentation.ts x: 1 contributors (all time) y: 148 lines of code src/utils/getParameterName.ts x: 1 contributors (all time) y: 21 lines of code src/utils/getPropertyName.ts x: 1 contributors (all time) y: 36 lines of code src/utils/getTSType.ts x: 1 contributors (all time) y: 411 lines of code src/utils/getTypeAnnotation.ts x: 1 contributors (all time) y: 17 lines of code src/utils/getTypeParameters.ts x: 1 contributors (all time) y: 35 lines of code src/utils/index.ts x: 1 contributors (all time) y: 28 lines of code src/utils/isExportsOrModuleAssignment.ts x: 1 contributors (all time) y: 23 lines of code src/utils/isReactCloneElementCall.ts x: 1 contributors (all time) y: 9 lines of code src/utils/isReactModuleName.ts x: 1 contributors (all time) y: 12 lines of code src/utils/isStatelessComponent.ts x: 1 contributors (all time) y: 172 lines of code src/utils/normalizeClassDefinition.ts x: 1 contributors (all time) y: 72 lines of code src/utils/resolveHOC.ts x: 1 contributors (all time) y: 38 lines of code src/utils/traverse.ts x: 1 contributors (all time) y: 27 lines of code benchmark/index.js x: 2 contributors (all time) y: 50 lines of code website/src/components/CodeMirrorPanel.js x: 1 contributors (all time) y: 78 lines of code website/src/components/Header.js x: 1 contributors (all time) y: 33 lines of code website/src/react-docgen.less x: 1 contributors (all time) y: 93 lines of code benchmark/fixtures/CircularProgress.js x: 1 contributors (all time) y: 204 lines of code
411.0
lines of code
  min: 3.0
  average: 66.56
  25th percentile: 17.25
  median: 42.0
  75th percentile: 96.0
  max: 411.0
0 3.0
contributors (all time)
min: 1.0 | average: 1.18 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 3.0

File Size vs. Commits (30 days): 9 points

website/src/index.js x: 1 commits (30d) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 commits (30d) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 1 commits (30d) y: 42 lines of code src/utils/isReactComponentClass.ts x: 1 commits (30d) y: 62 lines of code src/utils/resolveToModule.ts x: 1 commits (30d) y: 46 lines of code src/utils/resolveToValue.ts x: 1 commits (30d) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 2 commits (30d) y: 126 lines of code src/utils/getPropType.ts x: 1 commits (30d) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 1 commits (30d) y: 103 lines of code
224.0
lines of code
  min: 9.0
  average: 90.78
  25th percentile: 27.5
  median: 62.0
  75th percentile: 159.0
  max: 224.0
0 2.0
commits (30d)
min: 1.0 | average: 1.11 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 2.0

File Size vs. Contributors (30 days): 9 points

website/src/index.js x: 1 contributors (30d) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 contributors (30d) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 1 contributors (30d) y: 42 lines of code src/utils/isReactComponentClass.ts x: 1 contributors (30d) y: 62 lines of code src/utils/resolveToModule.ts x: 1 contributors (30d) y: 46 lines of code src/utils/resolveToValue.ts x: 1 contributors (30d) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 1 contributors (30d) y: 126 lines of code src/utils/getPropType.ts x: 1 contributors (30d) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 1 contributors (30d) y: 103 lines of code
224.0
lines of code
  min: 9.0
  average: 90.78
  25th percentile: 27.5
  median: 62.0
  75th percentile: 159.0
  max: 224.0
0 1.0
contributors (30d)
min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0

File Size vs. Commits (90 days): 9 points

website/src/index.js x: 1 commits (90d) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 commits (90d) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 1 commits (90d) y: 42 lines of code src/utils/isReactComponentClass.ts x: 1 commits (90d) y: 62 lines of code src/utils/resolveToModule.ts x: 1 commits (90d) y: 46 lines of code src/utils/resolveToValue.ts x: 1 commits (90d) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 2 commits (90d) y: 126 lines of code src/utils/getPropType.ts x: 1 commits (90d) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 1 commits (90d) y: 103 lines of code
224.0
lines of code
  min: 9.0
  average: 90.78
  25th percentile: 27.5
  median: 62.0
  75th percentile: 159.0
  max: 224.0
0 2.0
commits (90d)
min: 1.0 | average: 1.11 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 2.0

File Size vs. Contributors (90 days): 9 points

website/src/index.js x: 1 contributors (90d) y: 9 lines of code src/utils/isDestructuringAssignment.ts x: 1 contributors (90d) y: 13 lines of code src/utils/isReactBuiltinCall.ts x: 1 contributors (90d) y: 42 lines of code src/utils/isReactComponentClass.ts x: 1 contributors (90d) y: 62 lines of code src/utils/resolveToModule.ts x: 1 contributors (90d) y: 46 lines of code src/utils/resolveToValue.ts x: 1 contributors (90d) y: 192 lines of code src/utils/resolveObjectValuesToArray.ts x: 1 contributors (90d) y: 126 lines of code src/utils/getPropType.ts x: 1 contributors (90d) y: 224 lines of code src/utils/resolveObjectKeysToArray.ts x: 1 contributors (90d) y: 103 lines of code
224.0
lines of code
  min: 9.0
  average: 90.78
  25th percentile: 27.5
  median: 62.0
  75th percentile: 159.0
  max: 224.0
0 1.0
contributors (90d)
min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0