Skip to content

Commit

Permalink
fix: prettierrc and loadKubeConfig formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Nov 22, 2021
1 parent 4a1c801 commit f5ca29e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"^@ant-design?.+$",
"^@reduxjs?.+$",
"^@rjsf?.+$",
"<THIRD_PARTY_MODULES>",
"^(?![@\\.]).+$",
"^@constants",
"^@models",
"^@redux",
Expand Down
17 changes: 11 additions & 6 deletions src/redux/thunks/loadKubeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import {createAsyncThunk} from '@reduxjs/toolkit';
import {AppDispatch, RootState} from '@redux/store';
import * as k8s from '@kubernetes/client-node';
import {KubeConfig, KubeConfigContext} from '@models/kubeConfig';

import {createAsyncThunk} from '@reduxjs/toolkit';

import fs from 'fs';
import log from 'loglevel';

import {KubeConfig, KubeConfigContext} from '@models/kubeConfig';

import {AppDispatch, RootState} from '@redux/store';

import {createRejectionWithAlert} from './utils';

export const loadContexts = createAsyncThunk<
Expand All @@ -22,7 +28,7 @@ export const loadContexts = createAsyncThunk<
kc.loadFromFile(configPath);

const kubeConfig: KubeConfig = {
contexts: <Array<KubeConfigContext>>kc.contexts,
contexts: kc.contexts as KubeConfigContext[],
currentContext: kc.currentContext,
};
return kubeConfig;
Expand All @@ -31,8 +37,7 @@ export const loadContexts = createAsyncThunk<
}
}
} catch (e) {
//
log.info(e);
}

return thunkAPI.reject();
});

0 comments on commit f5ca29e

Please sign in to comment.