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
@@ -12,7 +12,6 @@ import { NamespaceSelectFilter } from "../+namespaces/namespace-select";
|
||||
import { isAllowedResource, KubeResource } from "../../../common/rbac";
|
||||
import { ResourceNames } from "../../../renderer/utils/rbac";
|
||||
import { autobind } from "../../utils";
|
||||
import { _i18n } from "../../i18n";
|
||||
|
||||
const resources: KubeResource[] = [
|
||||
"pods",
|
||||
|
||||
@@ -2,14 +2,18 @@ import "./overview-workload-status.scss";
|
||||
|
||||
import React from "react";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import { findDOMNode } from 'react-dom';
|
||||
import { findDOMNode } from "react-dom";
|
||||
import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { PieChart } from "../chart";
|
||||
import { cssVar } from "../../utils";
|
||||
import { ChartData } from "chart.js";
|
||||
import { ChartData, ChartDataSets } from "chart.js";
|
||||
import { themeStore } from "../../theme.store";
|
||||
|
||||
interface SimpleChartDataSets extends ChartDataSets {
|
||||
backgroundColor?: string[];
|
||||
}
|
||||
|
||||
interface Props {
|
||||
status: {
|
||||
[key: string]: number;
|
||||
@@ -21,6 +25,7 @@ export class OverviewWorkloadStatus extends React.Component<Props> {
|
||||
@observable elem: HTMLElement;
|
||||
|
||||
componentDidMount() {
|
||||
// eslint-disable-next-line react/no-find-dom-node
|
||||
this.elem = findDOMNode(this) as HTMLElement;
|
||||
}
|
||||
|
||||
@@ -40,8 +45,8 @@ export class OverviewWorkloadStatus extends React.Component<Props> {
|
||||
label: "Empty"
|
||||
}]
|
||||
};
|
||||
if (statuses.some(([key, val]) => val > 0)) {
|
||||
const dataset: any = {
|
||||
if (statuses.some(([, val]) => val > 0)) {
|
||||
const dataset: SimpleChartDataSets = {
|
||||
data: [],
|
||||
backgroundColor: [],
|
||||
label: "Status",
|
||||
|
||||
Reference in new issue
Block a user