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:
Sebastian Malton authored and GitHub committed 2020-11-27 08:48:38 -05:00
1 parent 10eb082854
commit 7451869c25
199 files changed
+1178 -807

No files matched your search

+3 -3
View File
@@ -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] });
}
}
});
});
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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 -1
View File
@@ -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";