Repository navigation
chore: enable type-aware oxlint with --type-check - #56
Merged
Merged
Conversation
Closes #55. Adds oxlint-tsgolint; lint-time tsconfigs now cover tests and test/.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Owner
Author
Rework onto main (no project references, TS 7.1, vitest 5, typed trainer): tsconfig.build.json for emit, tsconfig.json (noEmit, includes tests) for lint and IDE, root references so tsgolint finds every program, and fixes for the type errors the check now surfaces in tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55
Changes
pnpm lintnow runsoxlint --type-aware --type-check .; addedoxlint-tsgolint.tsconfig.json, and tests/test/were excluded (checked with default options, no three shims). Split each of three-ntc and three-ntc-trainer intotsconfig.build.json(previous config: build, project references, excludes tests, so published output is unchanged) and a lint/IDEtsconfig.json(no emit, includes src, tests andtest/). Root references, cli/website references and packagebuild/devscripts point attsconfig.build.json.test/performance-metrics.ts); newtest/tsconfig.jsonandtest/vitest-commands.d.ts(types the customrecordMetric/benchmarkConfigbrowser commands);three/addons/*shim added for three-ntc.Fixed (real issues surfaced)
no-redundant-type-constituents(26):X | nullwhere X is the repo's deliberateanyalias for untyped three; redundant constituent dropped.void main(),void test(...)in release.test.mjs, one in NTCEndToEnd.gpu.test.NTCCpuModel.wrapis never read, now optional;MLPLayerweights/biases acceptnumber[](trainer models use plain arrays);NTCTrainerquantizationaccepts the partialNTCQuantizationOptionsit already resolves;channelActivationsacceptsundefinedentries (NTCActivationincludes undefined and consumers handle it);NTCTrainProgress.cpuModeltyped asNTCGridPyramidModelinstead ofany.renderer,(url: string), one targeted@ts-expect-errorfor the deliberately invalid activation in NTCLoader.test.Validation
pnpm build && pnpm tsc && pnpm lint && pnpm exec oxfmt --check . && pnpm test+release:checkpass locally (61 unit tests; verified dist has no test files). Lint: 0 errors, 164 warnings. CI already runs lint after build.tsc vs lint
tsc -b --force~1.3s;pnpm lint~1.7s (warm).test/, which tsc never saw.--type-checkcould replacepnpm tscfor checking if the build-only config stays for emit.