Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-upload): bump major #146

Merged
merged 1 commit into from
Sep 17, 2024

feat(react-upload): bump major

cc6e11e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat(react-upload): bump major #146

feat(react-upload): bump major
cc6e11e
Select commit
Loading
Failed to load commit list.
GitHub Actions / Lint failed Sep 17, 2024 in 0s

Errors 439, Warnings 10

Found 439 errors and 10 warnings

Annotations

Check failure on line 8 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-function-return-type): Missing return type on function.

Missing return type on function.
Raw output
   5 | import { UserProvider } from '@atls/react-user'
   6 |
>  7 | const fetchSession = async (url) => {
     |                      ^
   8 |   const response = await fetch(url)
   9 |   const text = await response.text()
  10 |

Check failure on line 9 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `string | URL | Request`.

Unsafe argument of type `any` assigned to a parameter of type `string | URL | Request`.
Raw output
   6 |
   7 | const fetchSession = async (url) => {
>  8 |   const response = await fetch(url)
     |                                ^
   9 |   const text = await response.text()
  10 |
  11 |   return text ? JSON.parse(text) : null

Check failure on line 12 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.

Unsafe return of an `any` typed value.
Raw output
   9 |   const text = await response.text()
  10 |
> 11 |   return text ? JSON.parse(text) : null
     |   ^
  12 | }
  13 |
  14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {

Check failure on line 15 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.

Missing return type on function.
Raw output
  12 | }
  13 |
> 14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {
     |                                    ^
  15 |   const [session, setSession] = useState(null)
  16 |
  17 |   useEffect(() => {

Check failure on line 15 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-function-return-type): Missing return type on function.

Missing return type on function.
Raw output
  12 | }
  13 |
> 14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {
     |                                    ^
  15 |   const [session, setSession] = useState(null)
  16 |
  17 |   useEffect(() => {

Check failure on line 15 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-module-boundary-types): Object pattern argument should be typed.

Object pattern argument should be typed.
Raw output
  12 | }
  13 |
> 14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {
     |                                     ^
  15 |   const [session, setSession] = useState(null)
  16 |
  17 |   useEffect(() => {

Check failure on line 15 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(react/prop-types): 'url' is missing in props validation

'url' is missing in props validation
Raw output
  12 | }
  13 |
> 14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {
     |                                       ^
  15 |   const [session, setSession] = useState(null)
  16 |
  17 |   useEffect(() => {

Check failure on line 15 in packages/api-auth-user/src/api-auth-user.provider.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(react/prop-types): 'children' is missing in props validation

'children' is missing in props validation
Raw output
  12 | }
  13 |
> 14 | export const ApiAuthUserProvider = ({ url = '/api/auth/session', children }) => {
     |                                                                  ^
  15 |   const [session, setSession] = useState(null)
  16 |
  17 |   useEffect(() => {

Check failure on line 2 in packages/app-links/src/app-link.component.tsx

See this annotation in the file changed.

@github-actions 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 { FC }           from 'react'
    | ^
  2 |
  3 | import { AppLinkProps } from './app-url.interfaces'
  4 | import { useAppUrl }    from './use-app-url.hook'

Check failure on line 4 in packages/app-links/src/app-link.component.tsx

See this annotation in the file changed.

@github-actions 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 { FC }           from 'react'
  2 |
> 3 | import { AppLinkProps } from './app-url.interfaces'
    | ^
  4 | import { useAppUrl }    from './use-app-url.hook'
  5 |
  6 | export const AppLink: FC<AppLinkProps> = ({ children, subdomain, pathname }) => {

Check failure on line 5 in packages/app-links/src/use-app-url.hook.ts

See this annotation in the file changed.

@github-actions 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
  2 | import { getDomain }        from 'tldjs'
  3 |
> 4 | import { UseAppUrlProps }   from './app-url.interfaces'
    | ^
  5 | import { useBrowserEffect } from './use-browser-effect.hook'
  6 |
  7 | export const useAppUrl = ({ subdomain, pathname = '/' }: UseAppUrlProps = {}): string | null => {

Check failure on line 16 in packages/app-links/src/use-app-url.hook.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/restrict-template-expressions): Invalid type "string | null" of template literal expression.

Invalid type "string | null" of template literal expression.
Raw output
  13 |     const domain = getDomain(hostname)
  14 |
> 15 |     const origin = subdomain ? `${protocol}//${subdomain}.${domain}` : `${protocol}//${domain}`
     |                                                             ^
  16 |
  17 |     setUrl(`${origin}${pathname}`)
  18 |   }, [subdomain, pathname])

Check failure on line 16 in packages/app-links/src/use-app-url.hook.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/restrict-template-expressions): Invalid type "string | null" of template literal expression.

Invalid type "string | null" of template literal expression.
Raw output
  13 |     const domain = getDomain(hostname)
  14 |
> 15 |     const origin = subdomain ? `${protocol}//${subdomain}.${domain}` : `${protocol}//${domain}`
     |                                                                                        ^
  16 |
  17 |     setUrl(`${origin}${pathname}`)
  18 |   }, [subdomain, pathname])

Check failure on line 5 in packages/app-links/src/use-browser-effect.hook.ts

See this annotation in the file changed.

@github-actions 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
  2 | /* eslint-disable react-hooks/rules-of-hooks */
  3 |
> 4 | import { EffectCallback } from 'react'
    | ^
  5 | import { DependencyList } from 'react'
  6 | import { useEffect }      from 'react'
  7 |

Check failure on line 6 in packages/app-links/src/use-browser-effect.hook.ts

See this annotation in the file changed.

@github-actions 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
  3 |
  4 | import { EffectCallback } from 'react'
> 5 | import { DependencyList } from 'react'
    | ^
  6 | import { useEffect }      from 'react'
  7 |
  8 | export const useBrowserEffect = (effect: EffectCallback, deps?: DependencyList) => {

Check failure on line 9 in packages/app-links/src/use-browser-effect.hook.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.

Missing return type on function.
Raw output
   6 | import { useEffect }      from 'react'
   7 |
>  8 | export const useBrowserEffect = (effect: EffectCallback, deps?: DependencyList) => {
     |                                 ^
   9 |   if (typeof window === 'undefined') {
  10 |     return undefined
  11 |   }

Check failure on line 9 in packages/app-links/src/use-browser-effect.hook.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-function-return-type): Missing return type on function.

Missing return type on function.
Raw output
   6 | import { useEffect }      from 'react'
   7 |
>  8 | export const useBrowserEffect = (effect: EffectCallback, deps?: DependencyList) => {
     |                                 ^
   9 |   if (typeof window === 'undefined') {
  10 |     return undefined
  11 |   }

Check failure on line 14 in packages/app-links/src/use-browser-effect.hook.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/no-confusing-void-expression): Returning a void expression from a function is forbidden. Please remove the `return` statement.

Returning a void expression from a function is forbidden. Please remove the `return` statement.
Raw output
  11 |   }
  12 |
> 13 |   return useEffect(effect, deps)
     |          ^
  14 | }
  15 |

Check failure on line 16 in packages/identity-links/src/identity-link.component.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-function-return-type): Missing return type on function.

Missing return type on function.
Raw output
  13 |   const originalLocation = window.location
  14 |
> 15 |   const mockWindowLocation = (newLocation) => {
     |                              ^
  16 |     // @ts-ignore
  17 |     delete window.location
  18 |     window.location = newLocation

Check failure on line 17 in packages/identity-links/src/identity-link.component.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/prefer-ts-expect-error): Use "@ts-expect-error" to ensure an error is actually being suppressed.

Use "@ts-expect-error" to ensure an error is actually being suppressed.
Raw output
  14 |
  15 |   const mockWindowLocation = (newLocation) => {
> 16 |     // @ts-ignore
     |     ^
  17 |     delete window.location
  18 |     window.location = newLocation
  19 |   }

Check failure on line 30 in packages/identity-links/src/identity-link.component.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/explicit-function-return-type): Missing return type on function.

Missing return type on function.
Raw output
  27 |
  28 |     const { getByText } = render(
> 29 |       <IdentityLink returnTo>{(url) => <a href={url}>Login</a>}</IdentityLink>
     |                               ^
  30 |     )
  31 |
  32 |     // @ts-ignore

Check failure on line 33 in packages/identity-links/src/identity-link.component.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/prefer-ts-expect-error): Use "@ts-expect-error" to ensure an error is actually being suppressed.

Use "@ts-expect-error" to ensure an error is actually being suppressed.
Raw output
  30 |     )
  31 |
> 32 |     // @ts-ignore
     |     ^
  33 |     expect(getByText('Login')).toHaveAttribute(
  34 |       'href',
  35 |       'https://accounts.monstrs.dev/auth/login?return_to=https://identity.monstrs.dev/'

Check failure on line 2 in packages/identity-links/src/identity-link.component.tsx

See this annotation in the file changed.

@github-actions 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 { FC }                from 'react'
    | ^
  2 |
  3 | import { IdentityLinkProps } from './identity-url.interfaces'
  4 | import { useIdentityUrl }    from './use-identity-url.hook'

Check failure on line 4 in packages/identity-links/src/identity-link.component.tsx

See this annotation in the file changed.

@github-actions 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 { FC }                from 'react'
  2 |
> 3 | import { IdentityLinkProps } from './identity-url.interfaces'
    | ^
  4 | import { useIdentityUrl }    from './use-identity-url.hook'
  5 |
  6 | export const IdentityLink: FC<IdentityLinkProps> = ({ children, type, returnTo }) => {

Check failure on line 3 in packages/identity-links/src/identity-url.interfaces.ts

See this annotation in the file changed.

@github-actions github-actions / Lint

(@typescript-eslint/sort-type-constituents): Union type IdentityUrlType constituents must be sorted.

Union type IdentityUrlType constituents must be sorted.
Raw output
  1 | export type IdentityUrlType =
> 2 |   | 'login'
    |   ^
  3 |   | 'registration'
  4 |   | 'settings'
  5 |   | 'verification'