mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
02e77afcd1
commit
c6dce043a7
406 files changed
+1590
-1580
No files matched your search
@@ -75,7 +75,7 @@ AppPaths.init();
|
||||
describe("Extensions", () => {
|
||||
beforeEach(async () => {
|
||||
mockFs({
|
||||
"tmp": {}
|
||||
"tmp": {},
|
||||
});
|
||||
|
||||
ExtensionInstallationStateStore.reset();
|
||||
@@ -84,13 +84,13 @@ describe("Extensions", () => {
|
||||
id: "extensionId",
|
||||
manifest: {
|
||||
name: "test",
|
||||
version: "1.2.3"
|
||||
version: "1.2.3",
|
||||
},
|
||||
absolutePath: "/absolute/path",
|
||||
manifestPath: "/symlinked/path/package.json",
|
||||
isBundled: false,
|
||||
isEnabled: true,
|
||||
isCompatible: true
|
||||
isCompatible: true,
|
||||
});
|
||||
ExtensionDiscovery.createInstance().uninstallExtension = jest.fn(() => Promise.resolve());
|
||||
UserStore.createInstance();
|
||||
@@ -136,11 +136,11 @@ describe("Extensions", () => {
|
||||
(fse.unlink as jest.MockedFunction<typeof fse.unlink>).mockReturnValue(Promise.resolve() as any);
|
||||
|
||||
fireEvent.change(res.getByPlaceholderText("File path or URL", {
|
||||
exact: false
|
||||
exact: false,
|
||||
}), {
|
||||
target: {
|
||||
value: "https://test.extensionurl/package.tgz"
|
||||
}
|
||||
value: "https://test.extensionurl/package.tgz",
|
||||
},
|
||||
});
|
||||
|
||||
fireEvent.click(res.getByText("Install"));
|
||||
|
||||
@@ -31,10 +31,10 @@ import path from "path";
|
||||
import React from "react";
|
||||
import { SemVer } from "semver";
|
||||
import URLParse from "url-parse";
|
||||
import { Disposer, disposer, downloadFile, downloadJson, ExtendableDisposer, extractTar, listTarEntries, noop, readFileFromTar, } from "../../../common/utils";
|
||||
import { Disposer, disposer, downloadFile, downloadJson, ExtendableDisposer, extractTar, listTarEntries, noop, readFileFromTar } from "../../../common/utils";
|
||||
import { ExtensionDiscovery, InstalledExtension, manifestFilename } from "../../../extensions/extension-discovery";
|
||||
import { ExtensionLoader } from "../../../extensions/extension-loader";
|
||||
import { extensionDisplayName, LensExtensionId, LensExtensionManifest, sanitizeExtensionName, } from "../../../extensions/lens-extension";
|
||||
import { extensionDisplayName, LensExtensionId, LensExtensionManifest, sanitizeExtensionName } from "../../../extensions/lens-extension";
|
||||
import logger from "../../../main/logger";
|
||||
import { Button } from "../button";
|
||||
import { ConfirmDialog } from "../confirm-dialog";
|
||||
@@ -121,7 +121,7 @@ async function uninstallExtension(extensionId: LensExtensionId): Promise<boolean
|
||||
await when(() => !loader.userExtensions.has(extensionId));
|
||||
|
||||
Notifications.ok(
|
||||
<p>Extension <b>{displayName}</b> successfully uninstalled!</p>
|
||||
<p>Extension <b>{displayName}</b> successfully uninstalled!</p>,
|
||||
);
|
||||
|
||||
return true;
|
||||
@@ -238,7 +238,7 @@ async function createTempFilesAndValidate({ fileName, dataP }: InstallRequest):
|
||||
<div className="flex column gaps">
|
||||
<p>Installing <em>{fileName}</em> has failed, skipping.</p>
|
||||
<p>Reason: <em>{message}</em></p>
|
||||
</div>
|
||||
</div>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ async function unpackExtension(request: InstallRequestValidated, disposeDownload
|
||||
ExtensionLoader.getInstance().setIsEnabled(id, true);
|
||||
|
||||
Notifications.ok(
|
||||
<p>Extension <b>{displayName}</b> successfully installed!</p>
|
||||
<p>Extension <b>{displayName}</b> successfully installed!</p>,
|
||||
);
|
||||
} catch (error) {
|
||||
const message = getMessageFromError(error);
|
||||
@@ -375,7 +375,7 @@ async function attemptInstall(request: InstallRequest, d?: ExtendableDisposer):
|
||||
<b>Extension Install Collision:</b>
|
||||
<p>The <em>{name}</em> extension is currently {curState.toLowerCase()}.</p>
|
||||
<p>Will not proceed with this current install request.</p>
|
||||
</div>
|
||||
</div>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ async function attemptInstall(request: InstallRequest, d?: ExtendableDisposer):
|
||||
</div>,
|
||||
{
|
||||
onClose: dispose,
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -474,8 +474,8 @@ async function installFromSelectFileDialog() {
|
||||
message: `Select extensions to install (formats: ${supportedFormats.join(", ")}), `,
|
||||
buttonLabel: "Use configuration",
|
||||
filters: [
|
||||
{ name: "tarball", extensions: supportedFormats }
|
||||
]
|
||||
{ name: "tarball", extensions: supportedFormats },
|
||||
],
|
||||
});
|
||||
|
||||
if (!canceled) {
|
||||
@@ -503,7 +503,7 @@ export class Extensions extends React.Component<Props> {
|
||||
when(() => !ExtensionInstallationStateStore.anyInstalling, () => this.installPath = ""),
|
||||
]);
|
||||
}
|
||||
})
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,16 +76,16 @@ export const InstalledExtensions = observer(({ extensions, uninstall, enable, di
|
||||
},
|
||||
{
|
||||
Header: "Status",
|
||||
accessor: "status"
|
||||
accessor: "status",
|
||||
},
|
||||
{
|
||||
Header: "",
|
||||
accessor: "actions",
|
||||
disableSortBy: true,
|
||||
width: 20,
|
||||
className: "actions"
|
||||
}
|
||||
], []
|
||||
className: "actions",
|
||||
},
|
||||
], [],
|
||||
);
|
||||
|
||||
const data = useMemo(
|
||||
@@ -142,10 +142,10 @@ export const InstalledExtensions = observer(({ extensions, uninstall, enable, di
|
||||
<span className="title" aria-disabled={isUninstalling}>Uninstall</span>
|
||||
</MenuItem>
|
||||
</MenuActions>
|
||||
)
|
||||
),
|
||||
};
|
||||
});
|
||||
}, [extensions, ExtensionInstallationStateStore.anyUninstalling]
|
||||
}, [extensions, ExtensionInstallationStateStore.anyUninstalling],
|
||||
);
|
||||
|
||||
if (!ExtensionDiscovery.getInstance().isLoaded) {
|
||||
|
||||
Reference in new issue
Block a user