Enforce semicolons in eslint

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2020-11-19 16:35:04 +02:00
1 parent 0f3f5611ba
commit 1477bb8274
531 files changed
+3979 -3975

No files matched your search

+2 -2
View File
@@ -1,2 +1,2 @@
export * from './menu'
export * from './menu-actions'
export * from './menu';
export * from './menu-actions';
@@ -1,4 +1,4 @@
import "./menu-actions.scss"
import "./menu-actions.scss";
import React, { isValidElement } from "react";
import { observable } from "mobx";
@@ -25,7 +25,7 @@ export interface MenuActionsProps extends Partial<MenuProps> {
export class MenuActions extends React.Component<MenuActionsProps> {
static defaultProps: MenuActionsProps = {
get removeConfirmationMessage() {
return _i18n._(t`Remove item?`)
return _i18n._(t`Remove item?`);
}
}
@@ -49,7 +49,7 @@ export class MenuActions extends React.Component<MenuActionsProps> {
ok: removeAction,
labelOk: _i18n._(t`Remove`),
message: <div>{removeConfirmationMessage}</div>,
})
});
}
renderTriggerIcon() {
@@ -66,13 +66,13 @@ export class MenuActions extends React.Component<MenuActionsProps> {
material: isString(triggerIcon) ? triggerIcon : undefined,
active: this.isOpen,
...(typeof triggerIcon === "object" ? triggerIcon : {}),
}
};
if (iconProps.tooltip && this.isOpen) {
delete iconProps.tooltip; // don't show tooltip for icon when menu is open
}
return (
<Icon {...iconProps}/>
)
);
}
render() {
@@ -113,6 +113,6 @@ export class MenuActions extends React.Component<MenuActionsProps> {
)}
</Menu>
</>
)
);
}
}
+8 -8
View File
@@ -1,11 +1,11 @@
import './menu.scss'
import './menu.scss';
import React, { Fragment, ReactElement, ReactNode } from "react";
import { createPortal } from "react-dom";
import { autobind, cssNames, noop } from "../../utils";
import { Animate } from "../animate";
import { Icon, IconProps } from "../icon";
import debounce from "lodash/debounce"
import debounce from "lodash/debounce";
export const MenuContext = React.createContext<MenuContextValue>(null);
export type MenuContextValue = Menu;
@@ -129,8 +129,8 @@ export class Menu extends React.Component<MenuProps, State> {
// setup initial position
const position: MenuPosition = { left: true, bottom: true };
this.elem.style.left = left + "px"
this.elem.style.top = bottom + "px"
this.elem.style.left = left + "px";
this.elem.style.top = bottom + "px";
// correct position if menu doesn't fit to viewport
const menuPos = this.elem.getBoundingClientRect();
@@ -266,7 +266,7 @@ export function SubMenu(props: Partial<MenuProps>) {
closeOnClickItem={false}
{...menuProps}
/>
)
);
}
export interface MenuItemProps extends React.HTMLProps<any> {
@@ -327,10 +327,10 @@ export class MenuItem extends React.Component<MenuItemProps> {
onClick: this.onClick,
children: icon ? <><Icon {...iconProps}/> {children}</> : children,
ref: this.bindRef,
}
};
if (this.isLink) {
return <a {...elemProps}/>
return <a {...elemProps}/>;
}
return <li {...elemProps}/>
return <li {...elemProps}/>;
}
}