Skip to content

Commit e6d9086

Browse files
committed
fix: add typecheck + fix type errors
1 parent db15634 commit e6d9086

File tree

6 files changed

+34
-21
lines changed

6 files changed

+34
-21
lines changed

package-lock.json

Lines changed: 21 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
"test": "react-app-rewired test",
5353
"eject": "react-scripts eject",
5454
"prepublishOnly": "npm run package",
55+
"typecheck": "npm run typecheck:server && npm run typecheck:ui",
56+
"typecheck:server": "tsc -p src/server --noEmit",
57+
"typecheck:ui": "tsc -p src/ui --noEmit",
5558
"prepare": "husky install"
5659
},
5760
"lint-staged": {
@@ -78,6 +81,7 @@
7881
"@commitlint/cli": "^15.0.0",
7982
"@commitlint/config-conventional": "^15.0.0",
8083
"@types/lodash": "^4.14.178",
84+
"@types/react": "^17.0.44",
8185
"@types/react-dom": "^17.0.11",
8286
"@types/react-router": "^5.1.17",
8387
"@types/react-router-dom": "^5.3.2",
@@ -99,6 +103,6 @@
99103
"react-app-rewired": "^2.1.11",
100104
"react-dom": "^17.0.2",
101105
"stylelint": "^14.3.0",
102-
"typescript": "^4.5.4"
106+
"typescript": "^4.5.5"
103107
}
104108
}

src/components/AsideNavigation/AsideHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ import {
2020
FooterItemIconView,
2121
} from './constants';
2222
import i18n from './i18n';
23-
import {Lang} from 'utils/i18n';
23+
2424
import {getLocalData, setLocalData} from './helpers';
2525
import {SetSlotsContext, SlotsProvider} from './AsideHeaderFooterSlot/SlotsContext';
2626
import {SlotName} from './AsideHeaderFooterSlot/AsideHeaderFooterSlot';
2727

2828
import controlMenuButton from '../../assets/icons/control-menu-button.svg';
2929

3030
import './AsideHeader.scss';
31+
import {Lang} from '../../utils/i18n';
3132

3233
const b = block('nv-aside-header');
3334

src/containers/Authentication/Authentication.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Authentication({authenticate, error}: any) {
4343
authenticate(login, pass);
4444
};
4545

46-
const onEnterClick = (e: KeyboardEvent<HTMLInputElement>) => {
46+
const onEnterClick = (e: KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {
4747
if (e.keyCode === 13) {
4848
onLoginClick();
4949
}

src/containers/Node/NodeStructure/Vdisk.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
22
import cn from 'bem-cn-lite';
33

4-
import ProgressViewer from 'components/ProgressViewer/ProgressViewer';
5-
import {formatStorageValuesToGb, stringifyVdiskId} from 'utils';
6-
import {bytesToGB, bytesToSpeed} from 'utils/utils';
4+
import ProgressViewer from '../../../components/ProgressViewer/ProgressViewer';
5+
import {formatStorageValuesToGb, stringifyVdiskId} from '../../../utils';
6+
import {bytesToGB, bytesToSpeed} from '../../../utils/utils';
77
import EntityStatus from '../../../components/EntityStatus/EntityStatus';
88
import {valueIsDefined} from './NodeStructure';
9-
import InfoViewer from 'components/InfoViewer/InfoViewer';
9+
import InfoViewer from '../../../components/InfoViewer/InfoViewer';
1010

1111
const b = cn('kv-node-structure');
1212

tsconfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
22
"extends": "@yandex-cloud/tsconfig/tsconfig",
33
"compilerOptions": {
4-
"allowJs": true,
54
"outDir": "build/esm",
65
"module": "esnext",
76
"jsx": "react-jsx",
8-
"baseUrl": "src",
9-
"importHelpers": true,
107
"lib": [
118
"dom",
129
"dom.iterable",
@@ -18,7 +15,6 @@
1815
"noEmit": true
1916
},
2017
"include": [
21-
"src/**/*.ts",
22-
"src/**/*.tsx"
18+
"src/**/*"
2319
]
2420
}

0 commit comments

Comments
 (0)