Add more TS lints and fix types (#6037)
* Add as const lint * Add lint for no implied eval * Fix incorrect type and add lints * Add more type lints * Remove redundant type assertions and add lint * Fix to turn off incorrect base rules * Fix yarn lint workflow to wait for build:wasm * Change so that we don't build:wasm more than once in the workflow
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
import {
|
||||
IconDefinition as SolidIconDefinition,
|
||||
IconDefinition,
|
||||
faCircleExclamation,
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { IconDefinition as BrandIconDefinition } from '@fortawesome/free-brands-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { CustomIcon, CustomIconName } from './CustomIcon'
|
||||
|
||||
@ -14,7 +13,7 @@ const iconSizes = {
|
||||
}
|
||||
|
||||
export interface ActionIconProps extends React.PropsWithChildren {
|
||||
icon?: SolidIconDefinition | BrandIconDefinition | CustomIconName
|
||||
icon?: IconDefinition | CustomIconName
|
||||
iconColor?: string
|
||||
className?: string
|
||||
bgClassName?: string
|
||||
|
@ -98,9 +98,7 @@ function CommandBarHeader({ children }: React.PropsWithChildren<object>) {
|
||||
.map(([argName, arg], i) => {
|
||||
const argValue =
|
||||
(typeof argumentsToSubmit[argName] === 'function'
|
||||
? (argumentsToSubmit[argName] as Function)(
|
||||
commandBarState.context
|
||||
)
|
||||
? argumentsToSubmit[argName](commandBarState.context)
|
||||
: argumentsToSubmit[argName]) || ''
|
||||
|
||||
return (
|
||||
|
@ -517,10 +517,7 @@ interface FileTreeProps {
|
||||
className?: string
|
||||
file?: IndexLoaderData['file']
|
||||
onNavigateToFile: (
|
||||
focusableElement?:
|
||||
| HTMLElement
|
||||
| React.MutableRefObject<HTMLElement | null>
|
||||
| undefined
|
||||
focusableElement?: HTMLElement | React.MutableRefObject<HTMLElement | null>
|
||||
) => void
|
||||
}
|
||||
|
||||
|
@ -1431,7 +1431,6 @@ export const ModelingMachineProvider = ({
|
||||
parsed = pResult.program
|
||||
|
||||
if (trap(parsed)) return Promise.reject(parsed)
|
||||
parsed = parsed as Node<Program>
|
||||
if (!result.pathToReplaced)
|
||||
return Promise.reject(new Error('No path to replaced node'))
|
||||
const {
|
||||
|
Reference in New Issue
Block a user