Run type check for all web app packages in CI (#22578)

* Fix incorrect usage of types pacakge

* Make platform packages properly expose their type definitions

* Have Boards, Channels, and Playbooks get types from platform packages properly

* Run type check for all web app packages in CI

* Fix incorrect job name
Этот коммит содержится в:
Harrison Healey
2023-03-23 10:10:52 -04:00
коммит произвёл GitHub
родитель 2eb5dac9b7
Коммит 1edbde8aa3
25 изменённых файлов: 58 добавлений и 80 удалений

Просмотреть файл

@@ -127,7 +127,7 @@
"test": "jest --forceExit --detectOpenHandles --verbose",
"test:watch": "jest --watch",
"test-ci": "jest --forceExit --detectOpenHandles --maxWorkers=2",
"check-types": "tsc",
"check-types": "tsc -b",
"extract": "formatjs extract 'src/**/*.{ts,tsx}' --out-file i18n/temp.json --id-interpolation-pattern '[sha512:contenthash:base64:6]' && formatjs compile 'i18n/temp.json' --out-file i18n/en.json && rm i18n/temp.json",
"graphql": "graphql-codegen --config graphql_gen.ts",
"report-unused-exports": "ts-prune",

Просмотреть файл

@@ -7,7 +7,7 @@ import {Modal} from 'react-bootstrap';
import styled from 'styled-components';
import {useDispatch, useSelector} from 'react-redux';
import {searchProfiles} from 'mattermost-redux/actions/users';
import {UserProfile} from 'mattermost-webapp/packages/types/src/users';
import {UserProfile} from '@mattermost/types/users';
import {LightningBoltOutlineIcon} from '@mattermost/compass-icons/components';
import {OptionTypeBase, StylesConfig} from 'react-select';
import {General} from 'mattermost-redux/constants';

Просмотреть файл

@@ -7,7 +7,7 @@ import styled from 'styled-components';
import {AccountPlusOutlineIcon} from '@mattermost/compass-icons/components';
import {useDispatch, useSelector} from 'react-redux';
import {getProfilesByIds} from 'mattermost-redux/actions/users';
import {UserProfile} from 'mattermost-webapp/packages/types/src/users';
import {UserProfile} from '@mattermost/types/users';
import {sortByUsername} from 'mattermost-redux/utils/user_utils';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';

Просмотреть файл

@@ -24,15 +24,13 @@
"useUnknownInCatchVariables": false,
"paths": {
"src": ["src"],
"@mattermost/types/*": ["../platform/packages/types/src/*"],
"@mattermost/client": ["../platform/client/src"],
"@mattermost/components": ["../platform/components/src"],
"mattermost-redux/*": ["../channels/src/packages/mattermost-redux/src/*"],
"reselect": ["../channels/src/packages/reselect/src"]
}
},
"include": [
"./**/*"
"./i18n/*.json",
"./src/**/*",
],
"exclude": [
"dist",