Skip to content

Conversation

s-rigaud
Copy link
Contributor

@s-rigaud s-rigaud commented Feb 18, 2025

Description

Seems like the rule valid-jsdoc:preferType has some sever limitations:

  • It only works with @params and not with @type
  • It does not handled union type and only search for exact string

We could had some union types in the config to handle more cases but there is no real limit to what union can be used and the gain is really small as this rule is only here to keep some typing concistency internally.

If this become really a concern a custom eslint can be made to handle this.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.51
78.38
336.51
78.38
+0 B
+0 B
WebGPU 519.2
144.16
519.2
144.16
+0 B
+0 B
WebGPU Nodes 518.67
144.05
518.67
144.05
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.51
112.23
465.51
112.23
+0 B
+0 B
WebGPU 591.03
160.12
591.03
160.12
+0 B
+0 B
WebGPU Nodes 546.34
149.59
546.34
149.59
+0 B
+0 B

@Mugen87 Mugen87 merged commit 4473f14 into mrdoob:dev Feb 18, 2025
12 checks passed
@Mugen87 Mugen87 added this to the r174 milestone Feb 18, 2025
@s-rigaud s-rigaud deleted the eslint-limitation-preferType branch February 26, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants