mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-06 14:56:23 +01:00
Fix lint errors and show docs explorer on Cmd click
This commit is contained in:
1 parent
6f1fd7a254
commit
0c60d190af
48 files changed
+454
-199
No files matched your search
@@ -1,11 +1,11 @@
|
||||
import { Environment, PluginDefinition } from '@yaakapp/api';
|
||||
import type { Environment, PluginDefinition } from '@yaakapp/api';
|
||||
|
||||
export const plugin: PluginDefinition = {
|
||||
importer: {
|
||||
name: 'Yaak',
|
||||
description: 'Yaak official format',
|
||||
onImport(_ctx, args) {
|
||||
return migrateImport(args.text) as any;
|
||||
return migrateImport(args.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -14,7 +14,7 @@ export function migrateImport(contents: string) {
|
||||
let parsed;
|
||||
try {
|
||||
parsed = JSON.parse(contents);
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,6 @@ export function migrateImport(contents: string) {
|
||||
return { resources: parsed.resources }; // Should already be in the correct format
|
||||
}
|
||||
|
||||
function isJSObject(obj: any) {
|
||||
function isJSObject(obj: unknown) {
|
||||
return Object.prototype.toString.call(obj) === '[object Object]';
|
||||
}
|
||||
Reference in new issue
Block a user