Skip to content

Commit 15b5f6f

Browse files
committed
chore: modify eslint settings
1 parent b9126e3 commit 15b5f6f

File tree

34 files changed

+335
-92
lines changed

34 files changed

+335
-92
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ module.exports = {
1919
plugins: ['@typescript-eslint', 'import'],
2020
extends: [
2121
'eslint:recommended',
22+
'plugin:@typescript-eslint/recommended',
2223
'plugin:import/errors',
2324
'plugin:import/warnings',
2425
'plugin:import/typescript',
2526
'plugin:react/recommended',
2627
'plugin:react-hooks/recommended',
27-
'plugin:@typescript-eslint/recommended',
2828
'plugin:prettier/recommended',
2929
],
3030
rules: {

.prettierrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module.exports = {
22
semi: false,
3+
useTabs: false,
4+
tabWidth: 2,
35
singleQuote: true,
46
trailingComma: 'all',
5-
jsxBracketSameLine: true,
7+
bracketSpacing: true
68
}

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"verify-translation": "zx scripts/verify-translations.mjs"
2121
},
2222
"dependencies": {
23+
"@chakra-ui/icons": "^1.0.16",
2324
"@commitlint/cli": "^12.0.1",
2425
"@commitlint/config-angular": "^12.0.1",
2526
"@craco/craco": "^6.1.1",
@@ -54,8 +55,8 @@
5455
"@types/react-virtualized": "^9.21.10",
5556
"@types/semver": "^7.3.4",
5657
"@types/uuid": "^8.3.0",
57-
"@typescript-eslint/eslint-plugin": "^4.5.0",
58-
"@typescript-eslint/parser": "^4.5.0",
58+
"@typescript-eslint/eslint-plugin": "^5.2.0",
59+
"@typescript-eslint/parser": "^5.2.0",
5960
"autoprefixer": "^9.8.6",
6061
"await-to-js": "^3.0.0",
6162
"axios": "^0.21.0",
@@ -69,12 +70,13 @@
6970
"enzyme": "^3.11.0",
7071
"enzyme-adapter-react-16": "^1.15.5",
7172
"enzyme-to-json": "^3.6.1",
72-
"eslint": "^7.12.0",
73+
"eslint": "^7.32.0",
7374
"eslint-config-prettier": "^8.1.0",
7475
"eslint-plugin-import": "^2.22.1",
75-
"eslint-plugin-prettier": "^3.3.1",
76+
"eslint-plugin-prettier": "^4.0.0",
7677
"eslint-plugin-react": "^7.21.5",
7778
"eslint-plugin-react-hooks": "^4.2.0",
79+
"framer-motion": "^4",
7880
"fs-extra": "^10.0.0",
7981
"husky": "^5.2.0",
8082
"i18next": "^20.3.1",
@@ -89,6 +91,7 @@
8991
"node-sass": "^6",
9092
"np": "^7.4.0",
9193
"npm-debug-log-cleaner": "^1.0.3",
94+
"postcss": "^7",
9295
"postcss-import": "^12.0.1",
9396
"prettier": "^2.2.1",
9497
"prop-types": "^15.7.2",
@@ -102,7 +105,7 @@
102105
"react-hook-form": "^7.8.4",
103106
"react-i18next": "^11.10.0",
104107
"react-router-dom": "^5.2.0",
105-
"react-scripts": "4.0.3",
108+
"react-scripts": "^4.0.3",
106109
"react-scroll-to": "^3.0.0-beta.6",
107110
"react-tabs": "^3.1.1",
108111
"react-toastify": "^7.0.3",

src/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
/** @jsx jsx */
22
import { jsx } from '@emotion/core'
33
import { find } from 'lodash-es'
4-
import React, { useCallback, useEffect, useRef, useState } from 'react'
5-
import { ThemeProvider } from 'emotion-theming'
6-
import { light } from '@sumup/design-tokens'
4+
import React, { useCallback, useEffect, useState } from 'react'
75
import {
86
Switch,
97
Route,
@@ -180,7 +178,8 @@ const App: React.FC = () => {
180178
}
181179
},
182180
refreshWhenOffline: true,
183-
}}>
181+
}}
182+
>
184183
<ScrollToTop />
185184
<ToastContainer />
186185
<NetworkErrorModal

src/components/ActionsModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ const ActionsModal = ({
4242
stretch
4343
key={action.id}
4444
onClick={action.onClick}
45-
variant="primary">
45+
variant="primary"
46+
>
4647
{t(action.title)}
4748
</Button>
4849
))}

src/components/Ad.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ const Ad: React.FC = () => {
7070
<ReactGA.OutboundLink
7171
eventLabel={`IndexAd_${ad.name}`}
7272
to={ad.url}
73-
target="_blank">
73+
target="_blank"
74+
>
7475
<div tw="bg-blue-100 border border-blue-500 rounded text-blue-700 px-4 py-3 flex items-center">
7576
{showDynamicAd.current && (
7677
<span tw="flex rounded-full bg-indigo-500 uppercase px-2 py-1 text-xs font-bold text-white mr-3">

src/components/BackButton/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const BackButton: React.FC = () => {
1717
tw="w-8 h-8 mr-3 self-center"
1818
css={css`
1919
padding: 0.3rem;
20-
`}>
20+
`}
21+
>
2122
<ChevronLeft />
2223
</IconButton>
2324
)

src/components/FixedFullscreenContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const FixedFullscreenContainer: React.FC<{
2222
padding-bottom: env(safe-area-inset-bottom);
2323
`
2424
: '',
25-
]}>
25+
]}
26+
>
2627
<div tw="w-full h-full flex flex-col">{props.children}</div>
2728
</div>
2829
)

src/components/NetworkErrorModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const NetworkErrorModal: React.FC<NetworkErrorModalProps> = ({
3939
<Button
4040
onClick={() => {
4141
window.location.reload()
42-
}}>
42+
}}
43+
>
4344
{t('common.reload_window_retry')}
4445
</Button>
4546
) : (

src/components/NewVersionAlert.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const NewVersionAlert: React.FC = () => {
4343
isOpen={isOpen}
4444
onClose={() => {
4545
setIsOpen(false)
46-
}}>
46+
}}
47+
>
4748
{({ onClose }) => (
4849
<ModalWrapper>
4950
<ModalHeader title={t('new_version_alert.title')} onClose={onClose} />

0 commit comments

Comments
 (0)