1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

enfore unix line endings and always ending files with line endings (#1997)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-01-21 08:09:41 -05:00 committed by GitHub
parent 64be4ee948
commit 2e2283bcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
92 changed files with 97 additions and 91 deletions

View File

@ -46,6 +46,8 @@ module.exports = {
"avoidEscape": true,
"allowTemplateLiterals": true,
}],
"linebreak-style": ["error", "unix"],
"eol-last": ["error", "always"],
"semi": ["error", "always"],
"object-shorthand": "error",
"prefer-template": "error",
@ -101,6 +103,8 @@ module.exports = {
}],
"semi": "off",
"@typescript-eslint/semi": ["error"],
"linebreak-style": ["error", "unix"],
"eol-last": ["error", "always"],
"object-shorthand": "error",
"prefer-template": "error",
"template-curly-spacing": "error",
@ -162,6 +166,8 @@ module.exports = {
}],
"semi": "off",
"@typescript-eslint/semi": ["error"],
"linebreak-style": ["error", "unix"],
"eol-last": ["error", "always"],
"object-shorthand": "error",
"prefer-template": "error",
"template-curly-spacing": "error",

View File

@ -1 +1 @@
module.exports = {};
module.exports = {};

View File

@ -1 +1 @@
module.exports = {};
module.exports = {};

View File

@ -56,4 +56,4 @@ export function resolveStatusForCronJobs(cronJob: K8sApi.CronJob): K8sApi.KubeOb
text: `${event.message}`,
timestamp: event.metadata.creationTimestamp
};
}
}

View File

@ -77,4 +77,4 @@ describe("search store tests", () => {
searchStore.onSearch(logs, "Starting");
expect(searchStore.totalFinds).toBe(2);
});
});
});

View File

@ -101,4 +101,4 @@ describe("user store tests", () => {
expect(us.lastSeenAppVersion).toBe("0.0.0");
});
});
});
});

View File

@ -10,4 +10,4 @@ export class ExecValidationNotFoundError extends Error {
this.name = this.constructor.name;
Error.captureStackTrace(this, this.constructor);
}
}
}

View File

@ -175,4 +175,4 @@ export function validateKubeConfig (config: KubeConfig) {
throw new ExecValidationNotFoundError(execCommand, isAbsolute);
}
}
}
}

View File

@ -10,4 +10,4 @@ import { PrometheusProviderRegistry } from "../main/prometheus/provider-registry
PrometheusProviderRegistry.registerProvider(provider.id, provider);
});
export const prometheusProviders = PrometheusProviderRegistry.getProviders();
export const prometheusProviders = PrometheusProviderRegistry.getProviders();

View File

@ -133,4 +133,4 @@ export class SearchStore {
}
}
export const searchStore = new SearchStore;
export const searchStore = new SearchStore;

View File

@ -28,4 +28,4 @@ describe("split array on element tests", () => {
test("ten elements, in end array", () => {
expect(splitArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 9)).toStrictEqual([[0, 1, 2, 3, 4, 5, 6, 7, 8], [], true]);
});
});
});

View File

@ -26,4 +26,4 @@ class Singleton {
}
export { Singleton };
export default Singleton;
export default Singleton;

View File

@ -1 +1 @@
export * from "./registrations";
export * from "./registrations";

View File

@ -5,4 +5,4 @@ export type { KubeObjectMenuRegistration, KubeObjectMenuComponents } from "../re
export type { KubeObjectStatusRegistration } from "../registries/kube-object-status-registry";
export type { PageRegistration, RegisteredPage, PageParams, PageComponentProps, PageComponents, PageTarget } from "../registries/page-registry";
export type { PageMenuRegistration, ClusterPageMenuRegistration, PageMenuComponents } from "../registries/page-menu-registry";
export type { StatusBarRegistration } from "../registries/status-bar-registry";
export type { StatusBarRegistration } from "../registries/status-bar-registry";

View File

@ -8,4 +8,4 @@ export enum KubeObjectStatusLevel {
INFO = 1,
WARNING = 2,
CRITICAL = 3
}
}

View File

@ -2,4 +2,4 @@ import { themeStore } from "../../renderer/theme.store";
export function getActiveTheme() {
return themeStore.activeTheme;
}
}

View File

@ -31,4 +31,4 @@ export class BaseClusterDetector {
},
});
}
}
}

View File

@ -23,4 +23,4 @@ export class ClusterIdDetector extends BaseClusterDetector {
return response.metadata.uid;
}
}
}

View File

@ -48,4 +48,4 @@ detectorRegistry.add(ClusterIdDetector);
detectorRegistry.add(LastSeenDetector);
detectorRegistry.add(VersionDetector);
detectorRegistry.add(DistributionDetector);
detectorRegistry.add(NodesCountDetector);
detectorRegistry.add(NodesCountDetector);

View File

@ -11,4 +11,4 @@ export class LastSeenDetector extends BaseClusterDetector {
return { value: new Date().toJSON(), accuracy: 100 };
}
}
}

View File

@ -16,4 +16,4 @@ export class NodesCountDetector extends BaseClusterDetector {
return response.items.length;
}
}
}

View File

@ -16,4 +16,4 @@ export class VersionDetector extends BaseClusterDetector {
return response.gitVersion;
}
}
}

View File

@ -18,4 +18,4 @@ export default {
...version270Beta1,
...version360Beta1,
...snap
};
};

View File

@ -79,4 +79,4 @@ describe("KubeApi", () => {
expect(kubeApi.apiPrefix).toEqual("/apis");
expect(kubeApi.apiGroup).toEqual("extensions");
});
});
});

View File

@ -82,4 +82,4 @@ export class WorkloadKubeObject extends KubeObject {
return Object.keys(affinity).length;
}
}
}

View File

@ -11,4 +11,4 @@ export interface IHelmChartsRouteParams {
repo?: string;
}
export const helmChartsURL = buildURL<IHelmChartsRouteParams>(helmChartsRoute.path);
export const helmChartsURL = buildURL<IHelmChartsRouteParams>(helmChartsRoute.path);

View File

@ -1,2 +1,2 @@
export * from "./helm-charts";
export * from "./helm-charts.route";
export * from "./helm-charts.route";

View File

@ -1,2 +1,2 @@
export * from "./releases";
export * from "./release.route";
export * from "./release.route";

View File

@ -1,2 +1,2 @@
export * from "./apps";
export * from "./apps.route";
export * from "./apps.route";

View File

@ -48,4 +48,4 @@ export class ClusterHomeDirSetting extends React.Component<Props> {
</>
);
}
}
}

View File

@ -45,4 +45,4 @@ export class ClusterNameSetting extends React.Component<Props> {
</>
);
}
}
}

View File

@ -45,4 +45,4 @@ export class ClusterProxySetting extends React.Component<Props> {
</>
);
}
}
}

View File

@ -25,4 +25,4 @@ export class General extends React.Component<Props> {
<ClusterAccessibleNamespaces cluster={this.props.cluster} />
</div>;
}
}
}

View File

@ -17,4 +17,4 @@ export class Removal extends React.Component<Props> {
</div>
);
}
}
}

View File

@ -58,4 +58,4 @@ export class Status extends React.Component<Props> {
</div>
</div>;
}
}
}

View File

@ -95,4 +95,4 @@ export const ClusterMetrics = observer(() => {
{renderMetrics()}
</div>
);
});
});

View File

@ -1,2 +1,2 @@
export * from "./landing-page.route";
export * from "./landing-page";
export * from "./landing-page";

View File

@ -1,3 +1,3 @@
export * from "./pod-security-policies.route";
export * from "./pod-security-policies";
export * from "./pod-security-policy-details";
export * from "./pod-security-policy-details";

View File

@ -49,4 +49,4 @@ export const rolesStore = new RolesStore();
apiManager.registerStore(rolesStore, [
roleApi,
clusterRoleApi,
]);
]);

View File

@ -1,3 +1,3 @@
export * from "./service-accounts";
export * from "./service-accounts-details";
export * from "./create-service-account-dialog";
export * from "./create-service-account-dialog";

View File

@ -1,2 +1,2 @@
export * from "./user-management";
export * from "./user-management.route";
export * from "./user-management.route";

View File

@ -1,2 +1,2 @@
export * from "./pods";
export * from "./pod-details";
export * from "./pod-details";

View File

@ -27,4 +27,4 @@ export class PodDetailsStatuses extends React.Component<Props> {
</div>
);
}
}
}

View File

@ -1,2 +1,2 @@
export * from "./statefulsets";
export * from "./statefulset-details";
export * from "./statefulset-details";

View File

@ -154,4 +154,4 @@ export class AceEditor extends React.Component<Props, State> {
</div>
);
}
}
}

View File

@ -1 +1 @@
export * from "./ace-editor";
export * from "./ace-editor";

View File

@ -1 +1 @@
export * from "./add-remove-buttons";
export * from "./add-remove-buttons";

View File

@ -1 +1 @@
export * from "./animate";
export * from "./animate";

View File

@ -39,4 +39,4 @@ export const BackgroundBlock = {
ctx.stroke();
ctx.restore();
}
};
};

View File

@ -220,4 +220,4 @@ export const cpuOptions: ChartOptions = {
}
}
}
};
};

View File

@ -213,4 +213,4 @@ export class Chart extends React.Component<ChartProps> {
</>
);
}
}
}

View File

@ -1,3 +1,3 @@
export * from "./chart";
export * from "./pie-chart";
export * from "./bar-chart";
export * from "./bar-chart";

View File

@ -64,4 +64,4 @@ export class PieChart extends React.Component<Props> {
ChartJS.Tooltip.positioners.cursor = function (elements: any, position: { x: number; y: number }) {
return position;
};
};

View File

@ -42,4 +42,4 @@ export function useRealTimeMetrics(metrics: IMetricValues, chartData: IChartData
}
return data;
}
}

View File

@ -95,4 +95,4 @@ export const ZebraStripes = {
cover.style.backgroundPositionX = `${-step * minutes}px`;
}
}
};
};

View File

@ -50,4 +50,4 @@ export class Checkbox extends React.PureComponent<CheckboxProps> {
</label>
);
}
}
}

View File

@ -1 +1 @@
export * from "./checkbox";
export * from "./checkbox";

View File

@ -1 +1 @@
export * from "./cluster-icon";
export * from "./cluster-icon";

View File

@ -1 +1 @@
export * from "./confirm-dialog";
export * from "./confirm-dialog";

View File

@ -48,4 +48,4 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: Props) =
{tabs.map(tab => <Fragment key={tab.id}>{renderTab(tab)}</Fragment>)}
</Tabs>
);
};
};

View File

@ -1 +1 @@
export * from "./editable-list";
export * from "./editable-list";

View File

@ -1 +1 @@
export * from "./error-boundary";
export * from "./error-boundary";

View File

@ -209,4 +209,4 @@ export class FilePicker extends React.Component<Props> {
return <Icon material="error" title={this.errorText}></Icon>;
}
}
}
}

View File

@ -1 +1 @@
export * from "./file-picker";
export * from "./file-picker";

View File

@ -1 +1 @@
export * from "./icon";
export * from "./icon";

View File

@ -54,4 +54,4 @@ export class SearchInputUrl extends React.Component<Props> {
/>
);
}
}
}

View File

@ -1 +1 @@
export * from "./item-list-layout";
export * from "./item-list-layout";

View File

@ -1 +1 @@
export * from "./kube-object-status-icon";
export * from "./kube-object-status-icon";

View File

@ -1 +1 @@
export * from "./kubeconfig-dialog";
export * from "./kubeconfig-dialog";

View File

@ -46,4 +46,4 @@ describe("<MainLayoutHeader />", () => {
expect(getByText("minikube")).toBeInTheDocument();
});
});
});

View File

@ -34,4 +34,4 @@ export class LoginLayout extends React.Component<Props> {
</section>
);
}
}
}

View File

@ -4,4 +4,4 @@ export const SidebarContext = React.createContext<SidebarContextValue>({ pinned:
export type SidebarContextValue = {
pinned: boolean;
};
};

View File

@ -1 +1 @@
export * from "./line-progress";
export * from "./line-progress";

View File

@ -1 +1 @@
export * from "./markdown-viewer";
export * from "./markdown-viewer";

View File

@ -34,4 +34,4 @@ export class MarkdownViewer extends Component<Props> {
/>
);
}
}
}

View File

@ -1 +1 @@
export * from "./radio";
export * from "./radio";

View File

@ -1,2 +1,2 @@
export * from "./resource-metrics";
export * from "./resource-metrics-text";
export * from "./resource-metrics-text";

View File

@ -1 +1 @@
export * from "./slider";
export * from "./slider";

View File

@ -1 +1 @@
export * from "./status-brick";
export * from "./status-brick";

View File

@ -19,4 +19,4 @@ export class StatusBrick extends React.Component<StatusBrickProps> {
/>
);
}
}
}

View File

@ -1 +1 @@
export * from "./virtual-list";
export * from "./virtual-list";

View File

@ -1 +1 @@
export * from "./wizard";
export * from "./wizard";

View File

@ -16,4 +16,4 @@ export function useInterval(callback: () => void, delay: number) {
return () => clearInterval(id);
}, [delay]);
}
}

View File

@ -2,4 +2,4 @@ import { useEffect } from "react";
export function useOnUnmount(callback: () => void) {
useEffect(() => callback, []);
}
}

View File

@ -10,4 +10,4 @@ export function useStorage<T>(key: string, initialValue?: T, options?: IStorageH
};
return [storageValue, setValue] as [T, (value: T) => void];
}
}

View File

@ -28,4 +28,4 @@ export function bindEvents() {
subscribeToBroadcast("renderer:reload", () => {
location.reload();
});
}
}

View File

@ -33,4 +33,4 @@ export function getMatchedClusterId(): string {
});
return matched?.params.clusterId;
}
}

View File

@ -5,4 +5,4 @@ import { bindEvents } from "./events";
export * from "./history";
export * from "./helpers";
bindEvents();
bindEvents();

View File

@ -12,4 +12,4 @@ describe("metricUnitsToNumber tests", () => {
test("with m suffix", () => {
expect(metricUnitsToNumber("124m")).toStrictEqual(124000000);
});
});
});

View File

@ -83,4 +83,4 @@ function getMeaningfulValues(values: number[], suffixes: string[], separator = "
.filter(([dur]) => dur > 0)
.map(([dur, suf]) => dur + suf)
.join(separator);
}
}

View File

@ -32,4 +32,4 @@ function convertToIndexNotation(key: string, firstItem = false) {
return `${prefix}${key}`;
}
}
}

View File

@ -13,4 +13,4 @@ declare function commandExists(
declare namespace commandExists {
function sync(commandName: string): boolean;
}
}