mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add no-unused and react/recommended to eslint (#1523)
* add no-unused-vars and no-unused-imports * added quotes: double, and remove ignore pattern * move itif and describeif into utils Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
10eb082854
commit
7451869c25
199 files changed
+1178
-807
No files matched your search
@@ -5,12 +5,12 @@ import { migration } from "../migration-wrapper";
|
||||
|
||||
export default migration({
|
||||
version: "2.0.0-beta.2",
|
||||
run(store, log) {
|
||||
run(store) {
|
||||
for (const value of store) {
|
||||
const contextName = value[0];
|
||||
// Looping all the keys gives out the store internal stuff too...
|
||||
if (contextName === "__internal__" || value[1].hasOwnProperty('kubeConfig')) continue;
|
||||
if (contextName === "__internal__" || value[1].hasOwnProperty("kubeConfig")) continue;
|
||||
store.set(contextName, { kubeConfig: value[1] });
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { migration } from "../migration-wrapper";
|
||||
|
||||
export default migration({
|
||||
version: "2.4.1",
|
||||
run(store, log) {
|
||||
run(store) {
|
||||
for (const value of store) {
|
||||
const contextName = value[0];
|
||||
if (contextName === "__internal__") continue;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { migration } from "../migration-wrapper";
|
||||
|
||||
export default migration({
|
||||
version: "2.6.0-beta.2",
|
||||
run(store, log) {
|
||||
run(store) {
|
||||
for (const value of store) {
|
||||
const clusterKey = value[0];
|
||||
if (clusterKey === "__internal__") continue;
|
||||
|
||||
@@ -10,7 +10,7 @@ export default migration({
|
||||
const cluster = value[1];
|
||||
if (!cluster.kubeConfig) continue;
|
||||
const kubeConfig = yaml.safeLoad(cluster.kubeConfig);
|
||||
if (!kubeConfig.hasOwnProperty('users')) continue;
|
||||
if (!kubeConfig.hasOwnProperty("users")) continue;
|
||||
const userObj = kubeConfig.users[0];
|
||||
if (userObj) {
|
||||
const user = userObj.user;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { migration } from "../migration-wrapper";
|
||||
|
||||
export default migration({
|
||||
version: "2.7.0-beta.0",
|
||||
run(store, log) {
|
||||
run(store) {
|
||||
for (const value of store) {
|
||||
const clusterKey = value[0];
|
||||
if (clusterKey === "__internal__") continue;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { v4 as uuid } from "uuid";
|
||||
|
||||
export default migration({
|
||||
version: "2.7.0-beta.1",
|
||||
run(store, log) {
|
||||
run(store) {
|
||||
const clusters: any[] = [];
|
||||
for (const value of store) {
|
||||
const clusterKey = value[0];
|
||||
|
||||
@@ -44,7 +44,7 @@ export default migration({
|
||||
const iconPath = cluster.preferences.icon.replace("store://", "");
|
||||
const fileData = fse.readFileSync(path.join(userDataPath, iconPath));
|
||||
|
||||
cluster.preferences.icon = `data:;base64,${fileData.toString('base64')}`;
|
||||
cluster.preferences.icon = `data:;base64,${fileData.toString("base64")}`;
|
||||
} else {
|
||||
delete cluster.preferences?.icon;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Fix embedded kubeconfig paths under snap config
|
||||
|
||||
import { migration } from "../migration-wrapper";
|
||||
import { ClusterModel, ClusterStore } from "../../common/cluster-store";
|
||||
import { ClusterModel } from "../../common/cluster-store";
|
||||
import { getAppVersion } from "../../common/utils/app-version";
|
||||
import fs from "fs";
|
||||
|
||||
|
||||
Reference in new issue
Block a user