mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
0f3f5611ba
commit
1477bb8274
531 files changed
+3979
-3975
No files matched your search
@@ -41,10 +41,10 @@ export class FileInput extends React.Component<Props> {
|
||||
file: file,
|
||||
data: reader.result,
|
||||
error: reader.error ? String(reader.error) : null,
|
||||
})
|
||||
});
|
||||
};
|
||||
reader.readAsText(file);
|
||||
})
|
||||
});
|
||||
});
|
||||
selectedFiles = await Promise.all(readingFiles);
|
||||
}
|
||||
@@ -61,6 +61,6 @@ export class FileInput extends React.Component<Props> {
|
||||
ref={e => this.input = e}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './input'
|
||||
export * from './search-input'
|
||||
export * from './search-input-url'
|
||||
export * from './file-input'
|
||||
export * from './input';
|
||||
export * from './search-input';
|
||||
export * from './search-input-url';
|
||||
export * from './file-input';
|
||||
@@ -5,13 +5,13 @@ import { autobind, cssNames, debouncePromise } from "../../utils";
|
||||
import { Icon } from "../icon";
|
||||
import * as Validators from "./input_validators";
|
||||
import { InputValidator } from "./input_validators";
|
||||
import isString from "lodash/isString"
|
||||
import isFunction from "lodash/isFunction"
|
||||
import isBoolean from "lodash/isBoolean"
|
||||
import uniqueId from "lodash/uniqueId"
|
||||
import isString from "lodash/isString";
|
||||
import isFunction from "lodash/isFunction";
|
||||
import isBoolean from "lodash/isBoolean";
|
||||
import uniqueId from "lodash/uniqueId";
|
||||
|
||||
const { conditionalValidators, ...InputValidators } = Validators;
|
||||
export { InputValidators, InputValidator }
|
||||
export { InputValidators, InputValidator };
|
||||
|
||||
type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
||||
type InputElementProps = InputHTMLAttributes<InputElement> & TextareaHTMLAttributes<InputElement> & DOMAttributes<InputElement>;
|
||||
@@ -47,7 +47,7 @@ const defaultProps: Partial<InputProps> = {
|
||||
maxRows: 10000,
|
||||
showValidationLine: true,
|
||||
validators: [],
|
||||
}
|
||||
};
|
||||
|
||||
export class Input extends React.Component<InputProps, State> {
|
||||
static defaultProps = defaultProps as object;
|
||||
@@ -86,7 +86,7 @@ export class Input extends React.Component<InputProps, State> {
|
||||
}
|
||||
|
||||
select() {
|
||||
this.input.select()
|
||||
this.input.select();
|
||||
}
|
||||
|
||||
private autoFitHeight() {
|
||||
@@ -154,7 +154,7 @@ export class Input extends React.Component<InputProps, State> {
|
||||
}
|
||||
|
||||
private getValidatorError(value: string, { message }: InputValidator) {
|
||||
if (isFunction(message)) return message(value, this.props)
|
||||
if (isFunction(message)) return message(value, this.props);
|
||||
return message || "";
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const isNumber: InputValidator = {
|
||||
isNaN(numVal) ||
|
||||
(min != null && numVal < min) ||
|
||||
(max != null && numVal > max)
|
||||
)
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ export const isPath: InputValidator = {
|
||||
condition: ({ type }) => type === "text",
|
||||
message: () => _i18n._(t`This field must be a valid path`),
|
||||
validate: value => !value || fse.pathExistsSync(value),
|
||||
}
|
||||
};
|
||||
|
||||
export const minLength: InputValidator = {
|
||||
condition: ({ minLength }) => !!minLength,
|
||||
|
||||
@@ -44,6 +44,6 @@ export class SearchInputUrl extends React.Component<Props> {
|
||||
onClear={this.clear}
|
||||
{...this.props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@ const defaultProps: Partial<Props> = {
|
||||
autoFocus: true,
|
||||
closeIcon: true,
|
||||
get placeholder() {
|
||||
return _i18n._(t`Search...`)
|
||||
return _i18n._(t`Search...`);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@observer
|
||||
export class SearchInput extends React.Component<Props> {
|
||||
@@ -70,7 +70,7 @@ export class SearchInput extends React.Component<Props> {
|
||||
const { className, compact, closeIcon, onClear, ...inputProps } = this.props;
|
||||
const icon = this.props.value
|
||||
? closeIcon ? <Icon small material="close" onClick={this.clear}/> : null
|
||||
: <Icon small material="search"/>
|
||||
: <Icon small material="search"/>;
|
||||
return (
|
||||
<Input
|
||||
{...inputProps}
|
||||
@@ -80,6 +80,6 @@ export class SearchInput extends React.Component<Props> {
|
||||
iconRight={icon}
|
||||
ref={this.input}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user