mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Turn on noUnusedLocals, noImplicitReturns, importsNotUsedAsValues: error, and isolatedModules (#2777)
This commit is contained in:
1 parent
489cef9595
commit
5ed4537979
287 files changed
+704
-628
No files matched your search
@@ -82,9 +82,8 @@ export class DropFileInput<T extends HTMLElement = any> extends React.Component<
|
||||
if (disabled) {
|
||||
return contentElem;
|
||||
}
|
||||
const isValidContentElem = React.isValidElement(contentElem);
|
||||
|
||||
if (isValidContentElem) {
|
||||
if (React.isValidElement(contentElem)) {
|
||||
const contentElemProps: React.HTMLProps<HTMLElement> = {
|
||||
className: cssNames("DropFileInput", contentElem.props.className, className, {
|
||||
droppable: this.dropAreaActive,
|
||||
@@ -97,6 +96,8 @@ export class DropFileInput<T extends HTMLElement = any> extends React.Component<
|
||||
|
||||
return React.cloneElement(contentElem, contentElemProps);
|
||||
}
|
||||
|
||||
return null;
|
||||
} catch (err) {
|
||||
logger.error(`Error: <DropFileInput/> must contain only single child element`);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { autobind, cssNames, debouncePromise, getRandId } from "../../utils";
|
||||
import { Icon } from "../icon";
|
||||
import { Tooltip, TooltipProps } from "../tooltip";
|
||||
import * as Validators from "./input_validators";
|
||||
import { InputValidator } from "./input_validators";
|
||||
import type { InputValidator } from "./input_validators";
|
||||
import isString from "lodash/isString";
|
||||
import isFunction from "lodash/isFunction";
|
||||
import isBoolean from "lodash/isBoolean";
|
||||
@@ -34,7 +34,8 @@ import uniqueId from "lodash/uniqueId";
|
||||
|
||||
const { conditionalValidators, ...InputValidators } = Validators;
|
||||
|
||||
export { InputValidators, InputValidator };
|
||||
export { InputValidators };
|
||||
export type { InputValidator };
|
||||
|
||||
type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
||||
type InputElementProps = InputHTMLAttributes<InputElement> & TextareaHTMLAttributes<InputElement> & DOMAttributes<InputElement>;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import type { InputProps } from "./input";
|
||||
import { ReactNode } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import fse from "fs-extra";
|
||||
|
||||
export interface InputValidator {
|
||||
|
||||
@@ -23,7 +23,7 @@ import React from "react";
|
||||
import debounce from "lodash/debounce";
|
||||
import { autorun, observable } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { InputProps } from "./input";
|
||||
import type { InputProps } from "./input";
|
||||
import { SearchInput } from "./search-input";
|
||||
import { createPageParam } from "../../navigation";
|
||||
|
||||
|
||||
Reference in new issue
Block a user