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

Changes in CSF name inference aren't reflected in codemod #8101

Closed
Hypnosphi opened this issue Sep 17, 2019 · 1 comment
Closed

Changes in CSF name inference aren't reflected in codemod #8101

Hypnosphi opened this issue Sep 17, 2019 · 1 comment

Comments

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 17, 2019

Run sb migrate stories-to-csf on following file:

storiesOf('Story', module)
  .add('camelCase', () => 'foo');

Expected:

export default {
  title: 'Story',
};

export const camelCase = () => 'foo';

camelCase.story = {
  name: 'camelCase',
};

Actual:

export default {
  title: 'Story',
};

export const startCase = () => 'foo';

startCase.story = {
  // Redundant, as default algorithm infers that anyway
  name: 'Start Case',
};

// Default algorithm infers "Camel Case" as story name
export const camelCase = () => 'foo';
@stale
Copy link

stale bot commented Oct 8, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant