mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Improve linting within @k8slens/core
- Turning on @typescript-eslint/recommended-requiring-type-checking - Turning off @typescript-eslint/no-unnecessary-type-assertion (due too many false positives) - Making @typescript-eslint/no-explicit-any an error (except in tests) Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
6184c2f03b
commit
fa44b795d4
734 files changed
+32216
-4566
No files matched your search
@@ -158,7 +158,9 @@ export interface BaseIconProps {
|
||||
"data-testid"?: string;
|
||||
}
|
||||
|
||||
export interface IconProps extends React.HTMLAttributes<any>, BaseIconProps {
|
||||
export interface IconProps
|
||||
extends React.HTMLAttributes<Element>,
|
||||
BaseIconProps {
|
||||
children?: StrictReactNode;
|
||||
}
|
||||
|
||||
@@ -204,7 +206,7 @@ const RawIcon = (props: IconProps & Dependencies) => {
|
||||
onClick?.(event);
|
||||
}
|
||||
};
|
||||
const boundOnKeyDown = (event: React.KeyboardEvent<any>) => {
|
||||
const boundOnKeyDown = (event: React.KeyboardEvent) => {
|
||||
switch (event.nativeEvent.code) {
|
||||
case "Space":
|
||||
|
||||
@@ -240,7 +242,7 @@ const RawIcon = (props: IconProps & Dependencies) => {
|
||||
tabIndex: isInteractive && focusable && !disabled ? 0 : undefined,
|
||||
style: size
|
||||
? ({
|
||||
"--size": size + (isNumber(size) ? "px" : ""),
|
||||
"--size": `${size}${isNumber(size) ? "px" : ""}`,
|
||||
} as React.CSSProperties)
|
||||
: undefined,
|
||||
...elemProps,
|
||||
|
||||
Reference in new issue
Block a user