-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript: Strict compile option for codemods
package
#23373
Merged
ndelangen
merged 14 commits into
storybookjs:next
from
aditya1:fix/convert-to-strict-ts-codemod-pkg
Nov 29, 2023
Merged
Typescript: Strict compile option for codemods
package
#23373
ndelangen
merged 14 commits into
storybookjs:next
from
aditya1:fix/convert-to-strict-ts-codemod-pkg
Nov 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndelangen
changed the title
Adding tyepscript strict compile option
Typescript: strict compile option for Jul 26, 2023
codemods
package
ndelangen
changed the title
Typescript: strict compile option for
Typescript: Strict compile option for Jul 26, 2023
codemods
packagecodemods
package
ndelangen
reviewed
Jul 26, 2023
ndelangen
requested review from
valentinpalkovic,
tmeasday and
yannbf
as code owners
November 29, 2023 00:33
ndelangen
approved these changes
Nov 29, 2023
ndelangen
approved these changes
Nov 29, 2023
36 tasks
44 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrates @storybook/codemod from #22176
Problem Statement
Packages in StoryBook mono-repo use Typescript. Although, some of them use typescript in non-strict fashion. This PR focuses on
codemod
package and turns on the strict mode.What I did
I migrated @storybook/codemod to use
strict:true
in typescript compiler options. It will enable better type-checking for this package. I've fixed most of the errors which were occurring after changing the strict flag to true. But in some cases, I've used thets-ignore
flag since the code flow was difficult to understand. And as per the issue description, for these PRs changes should not be non-functional, hence I decided to usets-ignore
. Mostly, addedts-ignore
at places where function arguments aren't matching.How to test
For testing, I ran all the existing Unit Tests and E2E Tests. This is a non-functional, non-breaking change running unit tests and E2E tests are sufficient for the testing.
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]