-
Notifications
You must be signed in to change notification settings - Fork 54
better ts lint #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
better ts lint #465
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # Files | ||
| **/.esm-cache/** | ||
| .vscode | ||
| .idea | ||
| .DS_Store | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| **/pnpm-lock.yaml | ||
| scripts/ | ||
| **/.esm-cache/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| function gthis() { | ||
| function gthis(): Record<string | symbol, unknown> { | ||
| return globalThis; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ export function defaultedBlockstoreRuntime( | |
| }, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| compact: async (blocks: BlockFetcher) => { | ||
| return {} as unknown as TransactionMeta; | ||
| return {} as unknown; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider using a more specific type instead of The change to return If the original - return {} as unknown;
+ return {} as TransactionMeta;
|
||
| }, | ||
| autoCompact: 100, | ||
| public: false, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Return value missing in save method
The save method declares
Promise<Result<void>>as its return type but doesn't return the result fromres.Ok(). This violates the method's contract and could cause issues for callers expecting a Result object.🔗 Analysis chain
Verify the save method's behavior change.
The save method now calls
res.Ok()without returning it. Please verify if this change is intentional and doesn't affect the method's contract.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 7968
Error: No shell scripts found
Script:
Length of output: 72
Script:
Length of output: 2221
Script:
Length of output: 1133
🧰 Tools
🪛 GitHub Actions: CI
[warning] Code style issues found. Run Prettier with --write to fix.