Skip to content

Commit

Permalink
Have Playbooks type check without using paths for platform packages
Browse files Browse the repository at this point in the history
  • Loading branch information
hmhealey committed Mar 16, 2023
1 parent c2c76ba commit 7c8c0c5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion webapp/playbooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
10 changes: 4 additions & 6 deletions webapp/playbooks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@
"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": [
"./**/*"
],
"exclude": [
"dist",
"!node_modules/@types"
"references": [
{"path": "../platform/client"},
{"path": "../platform/components"},
{"path": "../platform/types"}
]
}

0 comments on commit 7c8c0c5

Please sign in to comment.