Skip to content

Commit cdb6bc0

Browse files
authored
Merge pull request #2 from naveteam/feat/update-react-and-rhf
Feat/update react and ts
2 parents b2eb6a6 + e5a5681 commit cdb6bc0

19 files changed

Lines changed: 41 additions & 48 deletions

.eslintrc.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,16 @@ module.exports = {
1313
}
1414
},
1515
plugins: ['react-hooks'],
16-
extends: [
17-
'plugin:react/recommended',
18-
'plugin:@typescript-eslint/recommended',
19-
'prettier/@typescript-eslint',
20-
'plugin:prettier/recommended'
21-
],
16+
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
2217
rules: {
2318
quotes: [2, 'single'],
2419
semi: [2, 'never'],
2520
'comma-dangle': [2, 'never'],
2621
'no-trailing-spaces': [2],
2722
'jsx-quotes': ['error', 'prefer-single'],
2823
'react/jsx-boolean-value': [0],
24+
'react/jsx-uses-react': 'off',
25+
'react/react-in-jsx-scope': 'off',
2926
'react-hooks/rules-of-hooks': 'error',
3027
'prettier/prettier': 2,
3128
'space-before-function-paren': 0,

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"private": true,
55
"dependencies": {
66
"axios": "^0.19.2",
7-
"react": "^16.13.1",
8-
"react-dom": "^16.13.1",
7+
"react": "^17.0.2",
8+
"react-dom": "^17.0.2",
99
"react-hook-form": "^5.7.2",
1010
"react-router-dom": "^5.2.0",
11-
"react-scripts": "3.4.1",
11+
"react-scripts": "4.0.3",
1212
"styled-components": "^5.1.0",
1313
"styled-system": "^5.1.5",
14-
"typescript": "~3.7.2",
14+
"typescript": "~4.3.3",
1515
"yup": "^0.28.5"
1616
},
1717
"scripts": {
@@ -48,23 +48,23 @@
4848
"@storybook/react": "^5.3.18",
4949
"@types/jest": "^24.0.0",
5050
"@types/node": "^12.0.0",
51-
"@types/react": "^16.9.0",
52-
"@types/react-dom": "^16.9.0",
51+
"@types/react": "^17.0.11",
52+
"@types/react-dom": "^17.0.7",
5353
"@types/react-router-dom": "^5.1.5",
5454
"@types/styled-components": "^5.1.0",
5555
"@types/styled-system": "^5.1.9",
5656
"@types/yup": "^0.28.3",
57-
"@typescript-eslint/eslint-plugin": "^2.33.0",
58-
"@typescript-eslint/parser": "^2.33.0",
57+
"@typescript-eslint/eslint-plugin": "^4.27.0",
58+
"@typescript-eslint/parser": "^4.27.0",
5959
"cz-conventional-changelog": "3.2.0",
60-
"eslint": "^7.0.0",
61-
"eslint-config-prettier": "^6.11.0",
60+
"eslint": "^7.28.0",
61+
"eslint-config-prettier": "^8.3.0",
6262
"eslint-plugin-prettier": "^3.1.3",
6363
"eslint-plugin-react": "^7.20.0",
6464
"eslint-plugin-react-hooks": "^4.0.2",
6565
"husky": ">=4",
6666
"lint-staged": ">=10",
67-
"prettier": "^2.0.5",
67+
"prettier": "^2.3.1",
6868
"themeprovider-storybook": "^1.5.1"
6969
},
7070
"husky": {

src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { ThemeProvider, createGlobalStyle } from 'styled-components'
32
import { BrowserRouter as Router, Switch } from 'react-router-dom'
43

src/AuthenticatedApp.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { Route } from 'react-router-dom'
32

43
import { Home } from 'screens'

src/UnauthenticatedApp.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { Route } from 'react-router-dom'
32

43
import { Login } from 'screens'

src/components/Button/Button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import styled, { css } from 'styled-components'
32
import {
43
variant,

src/components/Column/Column.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import React from 'react'
2-
1+
import { FC } from 'react'
32
import { Row } from 'components'
43
import { RowProps } from 'components/Row'
54

65
export type ColumnProps = RowProps
76

8-
const ColumnComponent: React.FC<ColumnProps> = props => <Row flexDirection='column' {...props} />
7+
const ColumnComponent: FC<ColumnProps> = props => <Row flexDirection='column' {...props} />
98

109
export default ColumnComponent

src/components/Input/Input.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { FieldError } from 'react-hook-form'
32
import styled, { css } from 'styled-components'
43

src/components/Row/Row.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import { FC } from 'react'
22
import styled from 'styled-components'
33
import {
44
space,
@@ -17,7 +17,7 @@ import {
1717

1818
export interface RowProps extends SpaceProps, LayoutProps, ColorProps, BorderProps, PositionProps, FlexboxProps {}
1919

20-
const RowComponent: React.FC<RowProps> = styled.div<RowProps>(
20+
const RowComponent: FC<RowProps> = styled.div<RowProps>(
2121
{ display: 'flex' },
2222
space,
2323
layout,

src/components/Text/Text.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { FC } from 'react'
12
import styled from 'styled-components'
23
import {
34
space,
@@ -25,7 +26,7 @@ interface TextProps extends SpaceProps, LayoutProps, TypographyProps, ColorProps
2526
variant: keyof TextVariants
2627
}
2728

28-
const TextComponent: React.FC<TextProps> = styled.p(
29+
const TextComponent: FC<TextProps> = styled.p(
2930
variant({
3031
variants: {
3132
big: {

0 commit comments

Comments
 (0)