diff --git a/.eslintrc.js b/.eslintrc.js index e0ecc31cf3..554cf0c336 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -69,6 +69,9 @@ module.exports = { "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-empty-function": "off", "indent": ["error", 2] }, } diff --git a/Makefile b/Makefile index 6139afdfba..8e32f6cff3 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ integration-win: lint: yarn lint + yarn lint-dashboard test-app: yarn test diff --git a/dashboard/client/api/endpoints/pods.api.ts b/dashboard/client/api/endpoints/pods.api.ts index 2cc1ebf1a7..201f1e1751 100644 --- a/dashboard/client/api/endpoints/pods.api.ts +++ b/dashboard/client/api/endpoints/pods.api.ts @@ -173,7 +173,7 @@ export class Pod extends WorkloadKubeObject { }; configMap: { name: string; - } + }; secret: { secretName: string; defaultMode: number; diff --git a/dashboard/client/components/+network-endpoints/endpoint-details.tsx b/dashboard/client/components/+network-endpoints/endpoint-details.tsx index 158c7674c4..1fcfddc8d6 100644 --- a/dashboard/client/components/+network-endpoints/endpoint-details.tsx +++ b/dashboard/client/components/+network-endpoints/endpoint-details.tsx @@ -28,7 +28,7 @@ export class EndpointDetails extends React.Component { { endpoint.getEndpointSubsets().map((subset) => { return( - + ) }) } diff --git a/dashboard/client/components/+network-endpoints/endpoint-subset-list.tsx b/dashboard/client/components/+network-endpoints/endpoint-subset-list.tsx index 4964947151..399c6ca5f1 100644 --- a/dashboard/client/components/+network-endpoints/endpoint-subset-list.tsx +++ b/dashboard/client/components/+network-endpoints/endpoint-subset-list.tsx @@ -71,9 +71,9 @@ export class EndpointSubsetList extends React.Component { {address.hostname} { address.targetRef && ( - - {address.targetRef.name} - + + {address.targetRef.name} + )} @@ -90,45 +90,45 @@ export class EndpointSubsetList extends React.Component { return(
{addresses.length > 0 && ( -
-
Addresses
- - - IP - Hostname - Target - - { !addressesVirtual && addresses.map(address => this.getAddressTableRow(address.getId())) } -
-
+
+
Addresses
+ + + IP + Hostname + Target + + { !addressesVirtual && addresses.map(address => this.getAddressTableRow(address.getId())) } +
+
)} {notReadyAddresses.length > 0 && ( -
-
Not Ready Addresses
- - - IP - Hostname - Target - - { !notReadyAddressesVirtual && notReadyAddresses.map(address => this.getNotReadyAddressTableRow(address.getId())) } -
-
+
+
Not Ready Addresses
+ + + IP + Hostname + Target + + { !notReadyAddressesVirtual && notReadyAddresses.map(address => this.getNotReadyAddressTableRow(address.getId())) } +
+
)}
Ports
diff --git a/dashboard/client/components/+network-services/service-details-endpoint.tsx b/dashboard/client/components/+network-services/service-details-endpoint.tsx index 7bcc043431..a16d1c2c0a 100644 --- a/dashboard/client/components/+network-services/service-details-endpoint.tsx +++ b/dashboard/client/components/+network-services/service-details-endpoint.tsx @@ -23,25 +23,25 @@ export class ServiceDetailsEndpoint extends React.Component { return null } return ( -
+
- - Name - Endpoints - - showDetails(endpoint.selfLink, false))} - > - {endpoint.getName()} - { endpoint.toString()} - + + Name + Endpoints + + showDetails(endpoint.selfLink, false))} + > + {endpoint.getName()} + { endpoint.toString()} +
) diff --git a/dashboard/client/components/+workloads-pods/pod-container-env.tsx b/dashboard/client/components/+workloads-pods/pod-container-env.tsx index f5cce6fa8c..7da7d7e03d 100644 --- a/dashboard/client/components/+workloads-pods/pod-container-env.tsx +++ b/dashboard/client/components/+workloads-pods/pod-container-env.tsx @@ -125,14 +125,14 @@ const SecretKey = (props: SecretKeyProps) => { } return ( - <> + <> secretKeyRef({name}.{key})  - Show} - onClick={showKey} - /> - + Show} + onClick={showKey} + /> + ) } diff --git a/dashboard/client/components/+workloads-pods/pod-details.tsx b/dashboard/client/components/+workloads-pods/pod-details.tsx index 549d5232f6..bbe7650c75 100644 --- a/dashboard/client/components/+workloads-pods/pod-details.tsx +++ b/dashboard/client/components/+workloads-pods/pod-details.tsx @@ -174,28 +174,28 @@ export class PodDetails extends React.Component { { type == "configMap" && (
- {configMap && ( - Name}> - {configMap} - - - )} + {configMap && ( + Name}> + {configMap} + + + )}
)} { type === "emptyDir" && (
{ volume.emptyDir.medium && ( - Medium}> - {volume.emptyDir.medium} - + Medium}> + {volume.emptyDir.medium} + )} { volume.emptyDir.sizeLimit && ( Size Limit}> - {volume.emptyDir.sizeLimit} + {volume.emptyDir.sizeLimit} )}
diff --git a/dashboard/client/components/+workloads/workloads.tsx b/dashboard/client/components/+workloads/workloads.tsx index 895f1ab3a2..deab129006 100644 --- a/dashboard/client/components/+workloads/workloads.tsx +++ b/dashboard/client/components/+workloads/workloads.tsx @@ -81,7 +81,7 @@ export class Workloads extends React.Component { }) } return routes; - }; + } render() { const tabRoutes = Workloads.tabRoutes; diff --git a/dashboard/client/components/app.tsx b/dashboard/client/components/app.tsx index 220409ec12..1dea7068d9 100755 --- a/dashboard/client/components/app.tsx +++ b/dashboard/client/components/app.tsx @@ -44,7 +44,7 @@ class App extends React.Component { // render app render(, App.rootElem); - }; + } render() { const homeUrl = (isAllowedResource(["events", "nodes", "pods"])) ? clusterURL() : workloadsURL();