Open vibdev opened 2 years ago
Relevant file link: https://github.com/Workday/canvas-kit/blob/master/tsconfig.stories.json#L17
On prerelease/major
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:9:1 - error TS2528: A module cannot have multiple default exports.
9 export default () => {
~~~~~~~~~~~~~~~~~~~~~~
10 const [selected, setSelected] = React.useState(wineList[0].value);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
27 );
~~~~
28 };
~~
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:30:1
30 export default [
~~~~~~~~~~~~~~~~
31 {label: 'Beaujolais', value: 'beaujolais'},
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
49 {label: 'Zinfandel', value: 'zinfandel'},
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50 ];
~~
Another export default is here.
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:10:50 - error TS2304: Cannot find name 'wineList'.
10 const [selected, setSelected] = React.useState(wineList[0].value);
~~~~~~~~
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:20:18 - error TS2304: Cannot find name 'wineList'.
20 options={wineList}
~~~~~~~~
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:30:1 - error TS2528: A module cannot have multiple default exports.
30 export default [
~~~~~~~~~~~~~~~~
31 {label: 'Beaujolais', value: 'beaujolais'},
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
49 {label: 'Zinfandel', value: 'zinfandel'},
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50 ];
~~
modules/docs/dist/mdx/preview-react/form-field/examples/Select.tsx:9:1
9 export default () => {
~~~~~~~~~~~~~~~~~~~~~~
10 const [selected, setSelected] = React.useState(wineList[0].value);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
27 );
~~~~
28 };
~~
The first export default is here.
modules/docs/dist/mdx/react/button/button/examples/CustomStyles.tsx:8:32 - error TS2307: Cannot find module '../../../../../../utils/storybook' or its corresponding type declarations.
8 import {customColorTheme} from '../../../../../../utils/storybook';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modules/docs/dist/mdx/react/collection/examples/MultiSelection.tsx:12:37 - error TS2307: Cannot find module '../../lib/useSelectionListModel' or its corresponding type declarations.
12 import {multiSelectionManager} from '../../lib/useSelectionListModel';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 6 errors.
🔍 Improvement / Exploration
"skipLibCheck": true was added to tsconfig.stories.json.
This is not ideal and it should be removed, but there seems to be a conflict with the formik 2.x types and the version of @types/react we are using, I tried moving to @types/react 16.9.12 but that introduced a bunch of conflicts with react-testing library, updating that caused issues with enzyme. Revisit this later, perhaps after enzyme gets removed.
https://github.com/Workday/canvas-kit/pull/1201/files#r704839531
In Scope:
yarn type check
Out of Scope: