mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce eslint and prettier for features and start using it (#7306)
* Introduce package for sharing eslint and prettier configurations Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Start using eslint and prettier in packages Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> --------- Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
2789bcebcb
commit
699fc0309e
36 files changed
+2973
-610
No files matched your search
+7
-7
@@ -10,15 +10,15 @@ export type ApplicationInformation = {
|
||||
productName: string;
|
||||
copyright: string;
|
||||
description: string;
|
||||
k8sProxyVersion: string,
|
||||
bundledKubectlVersion: string,
|
||||
bundledHelmVersion: string,
|
||||
sentryDsn: string,
|
||||
contentSecurityPolicy: string,
|
||||
welcomeRoute: string,
|
||||
k8sProxyVersion: string;
|
||||
bundledKubectlVersion: string;
|
||||
bundledHelmVersion: string;
|
||||
sentryDsn: string;
|
||||
contentSecurityPolicy: string;
|
||||
welcomeRoute: string;
|
||||
updatingIsEnabled: boolean;
|
||||
dependencies: Partial<Record<string, string>>;
|
||||
}
|
||||
};
|
||||
|
||||
export const applicationInformationToken = getInjectionToken<ApplicationInformation>({
|
||||
id: "application-information-token",
|
||||
|
||||
@@ -9,9 +9,7 @@ export const applicationFeature = getFeature({
|
||||
di,
|
||||
targetModule: module,
|
||||
|
||||
getRequireContexts: () => [
|
||||
require.context("./", true, /\.injectable\.(ts|tsx)$/),
|
||||
],
|
||||
getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
|
||||
});
|
||||
},
|
||||
});
|
||||
+3
-7
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
createContainer,
|
||||
DiContainer,
|
||||
getInjectable,
|
||||
} from "@ogre-tools/injectable";
|
||||
import { createContainer, DiContainer, getInjectable } from "@ogre-tools/injectable";
|
||||
import { registerFeature } from "@k8slens/feature-core";
|
||||
import { applicationFeature } from "../feature";
|
||||
import { startApplicationInjectionToken } from "./start-application.injectable";
|
||||
@@ -46,7 +42,7 @@ describe("starting-of-application", () => {
|
||||
di.register(
|
||||
beforeApplicationIsLoadingInjectable,
|
||||
onLoadOfApplicationInjectable,
|
||||
afterApplicationIsLoadedInjectable
|
||||
afterApplicationIsLoadedInjectable,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -54,7 +50,7 @@ describe("starting-of-application", () => {
|
||||
beforeEach(() => {
|
||||
const startApplication = di.inject(startApplicationInjectionToken);
|
||||
|
||||
startApplication();
|
||||
void startApplication();
|
||||
});
|
||||
|
||||
it("calls runnables registered in before application is loading", () => {
|
||||
|
||||
Reference in new issue
Block a user