Skip to content
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

Feature : New middleware for storybook #773

Merged
merged 18 commits into from
Jan 14, 2022

Conversation

amaury-hanser
Copy link
Contributor

We are now able to mock the api calls directly inside storybook.

@amaury-hanser amaury-hanser added the Feature Type: New Feature label Dec 16, 2021
@amaury-hanser
Copy link
Contributor Author

amaury-hanser commented Dec 16, 2021

Failing because the typescript version required by msw is higher than the one we use...

I believe this PR would resolve the issue:
mswjs/msw#985

@Quetzacoalt91 Quetzacoalt91 added the WIP Status: Work In Progress label Dec 17, 2021
@amaury-hanser amaury-hanser marked this pull request as draft January 6, 2022 09:00
@Quetzacoalt91 Quetzacoalt91 added this to the 1.12.0 milestone Jan 7, 2022
@amaury-hanser
Copy link
Contributor Author

Well, after some time to investigate:

We have to disable this rule in _dev/.eslintrc.js

    'no-shadow': 'off',
    '@typescript-eslint/no-shadow': ['error'],

If we don't, we have false positive for every ENUMS.

The linter will still throw an error for code using shadow variables:

var a = 3;
function b() {
    var a = 10;
}

I'm confident in this change, however it's probably something that we should discuss before merging the PR

@amaury-hanser amaury-hanser removed the WIP Status: Work In Progress label Jan 13, 2022
@amaury-hanser amaury-hanser marked this pull request as ready for review January 13, 2022 08:27
@Quetzacoalt91 Quetzacoalt91 merged commit 7fcd594 into PrestaShopCorp:master Jan 14, 2022
@Quetzacoalt91 Quetzacoalt91 deleted the feat/msw branch January 14, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Type: New Feature
Projects
None yet
2 participants