Fix eslint warnings

pull/18209/head
afc163 6 years ago
parent 0448a0fc06
commit 5e99ed7bbe

@ -20,6 +20,7 @@ export default function throttleByAnimationFrame(fn: (...args: any[]) => void) {
}
export function throttleByAnimationFrameDecorator() {
// eslint-disable-next-line func-names
return function(target: any, key: string, descriptor: any) {
const fn = descriptor.value;
let definingProperty = false;

@ -23,6 +23,7 @@ if (typeof window !== 'undefined') {
// Fix https://github.com/ant-design/ant-design/issues/6560
// Fix https://github.com/ant-design/ant-design/issues/3308
const SlickCarousel = polyfill(require('react-slick').default);
export type CarouselEffect = 'scrollx' | 'fade';
export type DotPosition = 'top' | 'bottom' | 'left' | 'right';

@ -221,7 +221,7 @@ export default class Form extends React.Component<FormProps, any> {
static createFormField = createFormField;
static create = function<TOwnProps extends FormComponentProps>(
static create = function create<TOwnProps extends FormComponentProps>(
options: FormCreateOption<TOwnProps> = {},
): FormWrappedProps<TOwnProps> {
return createDOMForm({

@ -58,6 +58,7 @@ export default class ActionButton extends React.Component<ActionButtonProps, Act
},
(e: Error) => {
// Emit error when catch promise reject
// eslint-disable-next-line no-console
console.error(e);
// See: https://github.com/ant-design/ant-design/issues/6183
this.setState({ loading: false });

@ -16,7 +16,7 @@ function modalWarn(props: ModalFuncProps) {
return confirm(config);
}
Modal.info = function(props: ModalFuncProps) {
Modal.info = function infoFn(props: ModalFuncProps) {
const config = {
type: 'info',
icon: <Icon type="info-circle" />,
@ -26,7 +26,7 @@ Modal.info = function(props: ModalFuncProps) {
return confirm(config);
};
Modal.success = function(props: ModalFuncProps) {
Modal.success = function successFn(props: ModalFuncProps) {
const config = {
type: 'success',
icon: <Icon type="check-circle" />,
@ -36,7 +36,7 @@ Modal.success = function(props: ModalFuncProps) {
return confirm(config);
};
Modal.error = function(props: ModalFuncProps) {
Modal.error = function errorFn(props: ModalFuncProps) {
const config = {
type: 'error',
icon: <Icon type="close-circle" />,
@ -50,7 +50,7 @@ Modal.warning = modalWarn;
Modal.warn = modalWarn;
Modal.confirm = function(props: ModalFuncProps) {
Modal.confirm = function confirmFn(props: ModalFuncProps) {
const config = {
type: 'confirm',
okCancel: true,
@ -59,7 +59,7 @@ Modal.confirm = function(props: ModalFuncProps) {
return confirm(config);
};
Modal.destroyAll = function() {
Modal.destroyAll = function destroyAllFn() {
while (destroyFns.length) {
const close = destroyFns.pop();
if (close) {

Loading…
Cancel
Save