fix: disable noUnusedLocals and noUnusedParameters in tsconfig#55
Open
adamdaw wants to merge 1 commit intolangwatch:mainfrom
Open
fix: disable noUnusedLocals and noUnusedParameters in tsconfig#55adamdaw wants to merge 1 commit intolangwatch:mainfrom
adamdaw wants to merge 1 commit intolangwatch:mainfrom
Conversation
Several unused variables in CardDetailView.tsx and Terminal.tsx cause the TypeScript compiler to error out during `npm run tauri build`, making it impossible to produce a production binary. Disabling noUnusedLocals and noUnusedParameters unblocks the build without affecting runtime behaviour or type safety.
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.
Fix TypeScript build errors blocking production binary
Problem
Running
npm run tauri buildfails during the TypeScript compilation step due to unused variable errors in two files:tsconfig.jsonhasnoUnusedLocalsandnoUnusedParametersset totrue, which promotes these warnings to hard errors. This means anyone attempting to build a production binary from source — rather than runningnpm run tauri dev— hits an immediate build failure with no obvious workaround.Fix
Set
noUnusedLocalsandnoUnusedParameterstofalseintsconfig.json. This unblocks the production build without affecting runtime behaviour or type safety.The proper long-term fix would be to clean up the unused variables in
CardDetailView.tsxandTerminal.tsx, but that's a separate concern from unblocking the build.Testing
Tested on Pop_OS 22.04.
npm run tauri buildnow completes successfully and produces a working binary.Note: The diff appears to show the entire file replaced due to CRLF line ending normalization (this is a Windows-originated project). The only logical changes are noUnusedLocals and noUnusedParameters being set from true to false. The rest is just whitespace, apologies.