Errors 293, Warnings 5
Found 293 errors and 5 warnings
Annotations
Check failure on line 8 in cli/cli-ui-log-record-component/src/log-message.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
5 | import React from 'react'
6 |
> 7 | const getMessage = (body: Body) => {
| ^
8 | if (typeof body === 'string') {
9 | return body
10 | }
Check failure on line 14 in cli/cli-ui-log-record-component/src/log-message.component.tsx
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.
Unsafe return of an `any` typed value.
Raw output
11 |
12 | if (typeof body.message === 'string') {
> 13 | return body.message
| ^
14 | }
15 |
16 | if (body.stack) {
Check failure on line 12 in cli/cli-ui-log-record-component/src/log-record.component.test.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
9 | import { LogRecord } from './log-record.component.jsx'
10 |
> 11 | const createStack = () => {
| ^
12 | const cwd = process.cwd()
13 |
14 | return `Error: test
Check failure on line 12 in cli/cli-ui-log-record-component/src/log-record.component.tsx
github-actions / Lint
(@typescript-eslint/no-empty-interface): An interface declaring no members is equivalent to its supertype.
An interface declaring no members is equivalent to its supertype.
Raw output
9 | import { LogNamespace } from './log-namespace.component.jsx'
10 |
> 11 | export interface LogRecordProps extends Partial<Record> {}
| ^
12 |
13 | export const LogRecord: FC<LogRecordProps> = ({ severityText = 'TRACE', name, body }) => (
14 | <Box flexDirection='column'>
Check failure on line 18 in cli/cli-ui-log-record-component/src/log-record.component.tsx
github-actions / Lint
(react/jsx-no-leaked-render): Potential leaked value that might cause unintentionally rendered values or rendering crashes
Potential leaked value that might cause unintentionally rendered values or rendering crashes
Raw output
15 | <Box flexDirection='row'>
16 | <Box flexGrow={1}>
> 17 | <Box paddingRight={1}>{name && <LogNamespace>{name}</LogNamespace>}</Box>
| ^
18 | <Box>
19 | <LogMessage>{body}</LogMessage>
20 | </Box>
Check failure on line 7 in cli/cli-ui-parts/src/select-indicator.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
4 | import figures from 'figures'
5 |
> 6 | export const IndicatorComponent = ({ isSelected = false }) => (
| ^
7 | <Box marginRight={1}>
8 | {isSelected ? <Text color='cyanBright'>{figures.pointer}</Text> : <Text> </Text>}
9 | </Box>
Check failure on line 7 in cli/cli-ui-parts/src/select-indicator.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
4 | import figures from 'figures'
5 |
> 6 | export const IndicatorComponent = ({ isSelected = false }) => (
| ^
7 | <Box marginRight={1}>
8 | {isSelected ? <Text color='cyanBright'>{figures.pointer}</Text> : <Text> </Text>}
9 | </Box>
Check failure on line 7 in cli/cli-ui-parts/src/select-indicator.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Object pattern argument should be typed.
Object pattern argument should be typed.
Raw output
4 | import figures from 'figures'
5 |
> 6 | export const IndicatorComponent = ({ isSelected = false }) => (
| ^
7 | <Box marginRight={1}>
8 | {isSelected ? <Text color='cyanBright'>{figures.pointer}</Text> : <Text> </Text>}
9 | </Box>
Check failure on line 7 in cli/cli-ui-parts/src/select-indicator.component.tsx
github-actions / Lint
(react/prop-types): 'isSelected' is missing in props validation
'isSelected' is missing in props validation
Raw output
4 | import figures from 'figures'
5 |
> 6 | export const IndicatorComponent = ({ isSelected = false }) => (
| ^
7 | <Box marginRight={1}>
8 | {isSelected ? <Text color='cyanBright'>{figures.pointer}</Text> : <Text> </Text>}
9 | </Box>
Check failure on line 6 in cli/cli-ui-parts/src/select-item.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
3 | import React from 'react'
4 |
> 5 | export const ItemComponent = ({ label, value }: any) => (
| ^
6 | <Box>
7 | <Box width={12}>
8 | <Text bold color='#d7875f'>
Check failure on line 6 in cli/cli-ui-parts/src/select-item.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
3 | import React from 'react'
4 |
> 5 | export const ItemComponent = ({ label, value }: any) => (
| ^
6 | <Box>
7 | <Box width={12}>
8 | <Text bold color='#d7875f'>
Check failure on line 6 in cli/cli-ui-parts/src/select-item.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Object pattern argument should be typed with a non-any type.
Object pattern argument should be typed with a non-any type.
Raw output
3 | import React from 'react'
4 |
> 5 | export const ItemComponent = ({ label, value }: any) => (
| ^
6 | <Box>
7 | <Box width={12}>
8 | <Text bold color='#d7875f'>
Check failure on line 4 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/consistent-type-imports): All imports in the declaration are only used as types. Use `import type`.
All imports in the declaration are only used as types. Use `import type`.
Raw output
1 | import type { FC } from 'react'
2 |
> 3 | import { SubmitInjectedComponent } from '@yarnpkg/libui/sources/misc/renderForm.js'
| ^
4 | import { useStdin } from 'ink'
5 | import { useEffect } from 'react'
6 | import { useState } from 'react'
Check failure on line 10 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
7 | import React from 'react'
8 |
> 9 | const SubmitProxy = ({ value, useSubmit }: { value: any; useSubmit: Function }) => {
| ^
10 | const { stdin } = useStdin()
11 |
12 | useSubmit(value)
Check failure on line 10 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/ban-types): Don't use `Function` as a type. The `Function` type accepts any function-like value. It provides no type safety when calling the function, which can be a common source of bugs. It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`. If you are expecting the function to accept certain arguments, you should explicitly define the function shape.
Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape.
Raw output
7 | import React from 'react'
8 |
> 9 | const SubmitProxy = ({ value, useSubmit }: { value: any; useSubmit: Function }) => {
| ^
10 | const { stdin } = useStdin()
11 |
12 | useSubmit(value)
Check failure on line 22 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
19 | }
20 |
> 21 | export const SubmitInjectedComponentFactory = <T,>(InjectedComponent: any) => {
| ^
22 | // @ts-expect-error any
23 | const SubmitCmp: FC<SubmitInjectedComponent<T>> = ({ useSubmit }) => {
24 | const [value, setValue] = useState<T>()
Check failure on line 22 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
19 | }
20 |
> 21 | export const SubmitInjectedComponentFactory = <T,>(InjectedComponent: any) => {
| ^
22 | // @ts-expect-error any
23 | const SubmitCmp: FC<SubmitInjectedComponent<T>> = ({ useSubmit }) => {
24 | const [value, setValue] = useState<T>()
Check failure on line 22 in cli/cli-ui-parts/src/submit-factory.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Argument 'InjectedComponent' should be typed with a non-any type.
Argument 'InjectedComponent' should be typed with a non-any type.
Raw output
19 | }
20 |
> 21 | export const SubmitInjectedComponentFactory = <T,>(InjectedComponent: any) => {
| ^
22 | // @ts-expect-error any
23 | const SubmitCmp: FC<SubmitInjectedComponent<T>> = ({ useSubmit }) => {
24 | const [value, setValue] = useState<T>()
Check failure on line 5 in cli/cli-ui-parts/src/submit-result.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
2 |
3 | // @ts-expect-error any
> 4 | export const SubmitResult = ({ onSubmit, ...props }) => {
| ^
5 | useEffect(() => {
6 | onSubmit(props)
7 | }, [props, onSubmit])
Check failure on line 5 in cli/cli-ui-parts/src/submit-result.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
2 |
3 | // @ts-expect-error any
> 4 | export const SubmitResult = ({ onSubmit, ...props }) => {
| ^
5 | useEffect(() => {
6 | onSubmit(props)
7 | }, [props, onSubmit])
Check failure on line 5 in cli/cli-ui-parts/src/submit-result.component.tsx
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Object pattern argument should be typed.
Object pattern argument should be typed.
Raw output
2 |
3 | // @ts-expect-error any
> 4 | export const SubmitResult = ({ onSubmit, ...props }) => {
| ^
5 | useEffect(() => {
6 | onSubmit(props)
7 | }, [props, onSubmit])
Check failure on line 5 in cli/cli-ui-parts/src/submit-result.component.tsx
github-actions / Lint
(react/prop-types): 'onSubmit' is missing in props validation
'onSubmit' is missing in props validation
Raw output
2 |
3 | // @ts-expect-error any
> 4 | export const SubmitResult = ({ onSubmit, ...props }) => {
| ^
5 | useEffect(() => {
6 | onSubmit(props)
7 | }, [props, onSubmit])
Check failure on line 7 in cli/cli-ui-parts/src/submit-result.component.tsx
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
4 | export const SubmitResult = ({ onSubmit, ...props }) => {
5 | useEffect(() => {
> 6 | onSubmit(props)
| ^
7 | }, [props, onSubmit])
8 |
9 | return null
Check failure on line 22 in cli/cli-ui-stack-trace-component/src/stack-trace.component.tsx
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.
Unsafe return of an `any` typed value.
Raw output
19 |
20 | export const StackTrace: FC<StackTraceProps> = ({ children }) => {
> 21 | const stack = useMemo(() => parse(children), [children])
| ^
22 | const source = useMemo(() => (stack.topFrame ? getFrameSource(stack.topFrame) : null), [stack])
23 |
24 | if (!stack) {
Check failure on line 22 in cli/cli-ui-stack-trace-component/src/stack-trace.component.tsx
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
19 |
20 | export const StackTrace: FC<StackTraceProps> = ({ children }) => {
> 21 | const stack = useMemo(() => parse(children), [children])
| ^
22 | const source = useMemo(() => (stack.topFrame ? getFrameSource(stack.topFrame) : null), [stack])
23 |
24 | if (!stack) {