Issues (576)

src/entities/PageChangeAnimation/index.tsx (14 issues)

Severity
1
import { FC, ReactNode } from 'react'
2
import { SwitchTransition, CSSTransition } from 'react-transition-group'
3
4
interface IProps {
5
  mode?: 'out-in' | 'in-out'
0 ignored issues
show
propType "mode" is not required, but has no corresponding defaultProps declaration.
Loading history...
6
  classNames: string
7
  keyProp: number | string
8
  timeout: number
9
  children: ReactNode
10
}
11
12
const PageChangeAnimation: FC<IProps> = ({
0 ignored issues
show
Function component is not a function declaration
Loading history...
13
  children,
14
  classNames,
15
  keyProp,
16
  mode = 'out-in',
17
  timeout,
18
}) => (
19
  <SwitchTransition mode={mode}>
0 ignored issues
show
Expected indentation of 4 space characters but found 2.
Loading history...
JSX not allowed in files with extension '.tsx'
Loading history...
20
    <CSSTransition
0 ignored issues
show
Expected indentation of 6 space characters but found 4.
Loading history...
21
      key={keyProp}
0 ignored issues
show
Expected indentation of 8 space characters but found 6.
Loading history...
22
      onExited={() =>
0 ignored issues
show
Expected indentation of 8 space characters but found 6.
Loading history...
JSX props should not use arrow functions
Loading history...
JSX attribute values should not contain functions created in the same scope
Loading history...
23
        setTimeout(
24
          () =>
25
            window.scrollTo({
26
              top: 0,
27
              behavior: 'smooth',
28
            }),
29
          420,
30
        )
31
      }
0 ignored issues
show
Unexpected newline before '}'.
Loading history...
32
      timeout={timeout}
0 ignored issues
show
Expected indentation of 8 space characters but found 6.
Loading history...
33
      classNames={classNames}
0 ignored issues
show
Expected indentation of 8 space characters but found 6.
Loading history...
Props should be sorted alphabetically
Loading history...
34
    >
35
      {children}
0 ignored issues
show
Expected indentation of 8 space characters but found 6.
Loading history...
36
    </CSSTransition>
37
  </SwitchTransition>
38
)
39
40
export { PageChangeAnimation }
41