Conversation
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:
📋 All resultsClick to reveal the results table (337 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
|
pkg.pr.new packages benchmark commit |
There was a problem hiding this comment.
Pull request overview
This pull request enables type-aware linting for the TypeGPU codebase by integrating oxlint --type-aware with the oxlint-tsgolint plugin. The changes address various linting warnings through systematic refactoring while maintaining the original logic of all code.
Changes:
- Added
oxlint-tsgolintpackage and enabled type-aware linting in the build process - Removed unnecessary type assertions and
undefinedunion types from function parameters - Added
voidprefix to floating promises to mark intentionally unwaited async operations - Simplified type guard functions by removing unnecessary generic parameters
- Added
.bind()calls to preserve context when extracting method references - Added targeted lint suppressions with explanatory comments where needed
Reviewed changes
Copilot reviewed 106 out of 107 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.oxlintrc.json |
Added rules for type-aware linting, disabled some rules, added .mjs to ignore patterns |
package.json |
Updated test script to use --type-aware flag, added oxlint-tsgolint dependency |
pnpm-lock.yaml |
Added oxlint-tsgolint package and updated @types/bun |
tsconfig.base.json |
Removed unused baseUrl configuration option |
packages/typegpu/tsconfig.json |
Added tests/**/* to includes for type checking |
packages/tinyest-for-wgsl/tsconfig.json |
Removed empty compilerOptions object |
packages/typegpu/src/*.ts |
Removed unnecessary type assertions, simplified type guards, added void to floating promises |
packages/typegpu/src/data/*.ts |
Removed redundant ` |
packages/typegpu/src/core/**/*.ts |
Added method context binding with .bind(), removed unnecessary type parameters |
packages/typegpu/src/std/*.ts |
Added .bind() calls for method references, removed unnecessary casts |
packages/typegpu/src/tgsl/*.ts |
Added lint suppressions with justifications, removed unnecessary type assertions |
packages/typegpu-three/src/*.ts |
Added lint suppressions for legitimate cases, removed ` |
apps/typegpu-docs/src/**/*.ts |
Added void to floating promises, fixed string interpolation, added suppressions |
packages/tgpu-gen/tgpu-gen.mjs |
Added void to floating promises |
apps/bun-example/preload.ts |
Added void to plugin call |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
iwoplaza
left a comment
There was a problem hiding this comment.
A substantial cleanup! 👏💜
| export function getGPUValue( | ||
| object: unknown, | ||
| ): WithGPUValue<unknown>[typeof $gpuValueOf] | undefined { | ||
| ): unknown { |
There was a problem hiding this comment.
export interface WithGPUValue<T> {
readonly [$gpuValueOf]: T;
}
WithGPUValue<unknown>[typeof $gpuValueOf] | undefined
= { readonly [$gpuValueOf]: unknown; }[typeof $gpuValueOf] | undefined
= unknown | undefined
= unknown
Co-authored-by: Iwo Plaza <iwoplaza@gmail.com>
Co-authored-by: Iwo Plaza <iwoplaza@gmail.com>
Co-authored-by: Iwo Plaza <iwoplaza@gmail.com>
Co-authored-by: Iwo Plaza <iwoplaza@gmail.com>
Changes:
oxlint --type-aware,There should be no logic changes in this PR.