Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Initial release.

[1.3.0]: https://github.com/nathonius/obsidian-github-link/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/nathonius/obsidian-github-link/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/nathonius/obsidian-github-link/compare/1.0.3...1.1.0
[1.0.3]: https://github.com/nathonius/obsidian-github-link/compare/1.0.2...1.0.3
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "GitHub Link",
"version": "1.3.0",
"minAppVersion": "1.11.4",
"description": "Enrich your notes with issue and pull request content from GitHub",
"description": "Enrich your notes with issue and pull request content from GitHub.",
"author": "Nathonius",
"authorUrl": "https://nathan-smith.org/",
"isDesktopOnly": false
}
}
2 changes: 0 additions & 2 deletions src/query/column/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { parseUrl, repoAPIToBrowserUrl } from "../../github/url-parse";

import { DateFormat } from "../../util";
Expand Down
1 change: 0 additions & 1 deletion src/settings/settings-tab.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { Notice, PluginSettingTab, Setting } from "obsidian";

import type { App } from "obsidian";
Expand Down
13 changes: 4 additions & 9 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,16 @@ export function safeJSONParse<T>(value: string, props: Record<keyof T, boolean>)
// Handle parsing with try / catch
let parsed: T;
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
parsed = JSON.parse(value);
parsed = JSON.parse(value) as T;
} catch (err) {
return null;
}

// Validate object shape
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result: any = {};
const result: Partial<Record<keyof T, unknown>> = {};
for (const [_prop, include] of Object.entries(props)) {
const prop = _prop as keyof T;
if (include && parsed[prop]) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
result[prop] = parsed[prop];
}
}
Expand Down Expand Up @@ -188,9 +185,7 @@ export class RequestError implements Error {
this.message = originalError.message;

// Request props
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
this.headers = (originalError as any).headers;
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
this.status = (originalError as any).status;
this.headers = (originalError as RequestError).headers;
this.status = (originalError as RequestError).status;
}
}
Loading