Repository navigation
chore(lint): explicit any is now a lint error - #260
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Nothing stopped a new
anyfrom landing, and 58 explicit uses were already in the tree.typescript/no-explicit-anyis now an error invite.config.ts, and the existing uses are gone. Test files are covered with no override, because only 8 of the 58 findings were in tests.Finding count
Each row is
vp lint --report-unused-disable-directivesat the repo root.no-explicit-anyfindingsmainwith the rule addedanyThe deliberate
anywas a throwaway file holdingexport const deliberate: any = 1;. It was deleted after the run:What replaced the 58
as anyon thesuper(...)call inFilesystemBrowseErrorand the five project error classes. The code typechecks without them.anywas a wildcard next toinferinrpc/client.ts,rpc/protocol.tsandOrchestrationEngine.test.ts. These now useEffect.Success, orneverfor parameters andunknownfor the covariant channels. A type-level equality check confirmed the fourEnvironmentRpc*types are identical to the old ones for every RPC tag.app.onandpowerMonitor.onare typed once per event name, so astringor a union of names needed a cast. The listeners now register through theNodeJS.EventEmitterthat both objects extend. It is the same object and the same call.Record<string, any>and(part: any)became declared shapes of the fields each script reads.cad-mcp-replay.tsreusesCadMcpToolResult.as anycasts inthreadReducer.test.tshid fixtures the schema no longer accepts:decision: "approve"is not a decision, andproject.createdhas noscriptsordeletedAt. The fixtures are valid now. The deliberately unknown event kind inshellReducer.test.tsuses@ts-expect-error.ReadonlyArray<any>inNodeSqliteClient.tsis now the row typeStatementSync.allreturns.expect.element, 1. Returns the polled assertion type.Sites that keep
anyRemoving these needs a logic change, so each keeps its
anybehind a one-lineoxlint-disable-next-linewith the reason.apps/server/src/persistence/NodeSqliteClient.ts, the four param spreads intostatement.allandstatement.run.Connectionpasses params asReadonlyArray<unknown>and node:sqlite types them asSQLInputValue. A runtime guard would change which error an unbindable param reports.apps/server/src/provider/ProviderDriver.ts,AnyProviderDriver.Configis invariant, so neitherunknownnorneveraccepts the built-in drivers. Erasing it withoutanyneeds each driver to close over its own config.Limits
JSON.parseoutput. The declared shapes check how the data is read, not the data.NodeSqliteClient.tsstill presentsStatementResultingChangesas a row array through its existingas unknown as.Verification
vp lintcounts above.--report-unused-disable-directivesreports none of the five new disables as unused.vpr typecheckpasses.ElectronApp,DesktopTelemetryPublisher,OrchestrationEngine,CodexFollowUpRuntime,NodeSqliteClient.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.