Skip to content

Latest commit

History

History
27 lines (16 loc) 路 850 Bytes

prefer-pascal-case.md

File metadata and controls

27 lines (16 loc) 路 850 Bytes

Prefer pascal case for story names (prefer-pascal-case)

Included in these configurations:

  • recommended

Rule Details

As a best practice, stories should be defined in PascalCase. This makes it simpler to visually differ stories to other code. Plus, it makes it simpler to define regexes for non-story exports.

Examples of incorrect code for this rule:

export const primaryButton = {}

Examples of correct code for this rule:

export const PrimaryButton = {}

Further Reading

More information about naming stories can be found here: https://storybook.js.org/docs/react/writing-stories/introduction#defining-stories