mirror of
https://github.com/Azure/k8s-set-context.git
synced 2026-06-23 23:39:28 +08:00
Vidya reddy pretty code (#53)
* updated action file with node16 * Code consistency using prettier and its workflow * Enforce Prettier * code fix * code fix * code fix Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
This commit is contained in:
+8
-8
@@ -1,7 +1,7 @@
|
||||
export enum Method {
|
||||
KUBECONFIG = "kubeconfig",
|
||||
SERVICE_ACCOUNT = "service-account",
|
||||
SERVICE_PRINCIPAL = "service-principal",
|
||||
KUBECONFIG = 'kubeconfig',
|
||||
SERVICE_ACCOUNT = 'service-account',
|
||||
SERVICE_PRINCIPAL = 'service-principal'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10,8 +10,8 @@ export enum Method {
|
||||
* @returns The Method enum or undefined if it can't be parsed
|
||||
*/
|
||||
export const parseMethod = (str: string): Method | undefined =>
|
||||
Method[
|
||||
Object.keys(Method).filter(
|
||||
(k) => Method[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof Method
|
||||
];
|
||||
Method[
|
||||
Object.keys(Method).filter(
|
||||
(k) => Method[k].toString().toLowerCase() === str.toLowerCase()
|
||||
)[0] as keyof typeof Method
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user