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

[guide] Fix description of rule 23.8 to specify export-default #2031

Closed
wants to merge 1 commit into from
Closed

[guide] Fix description of rule 23.8 to specify export-default #2031

wants to merge 1 commit into from

Conversation

DannyNemer
Copy link
Contributor

Fixes the description of rule 23.8 to specify naming files in "PascalCase when you export-default a constructor", not when you merely export a constructor (i.e., among multiple exports).

Fixes the description of rule 23.8 to specify naming files in "PascalCase when you export-**default** a constructor", not when you merely export a constructor (i.e., among multiple exports).
@@ -3308,7 +3308,7 @@ Other Style Guides
```

<a name="naming--PascalCase-singleton"></a><a name="22.8"></a>
- [23.8](#naming--PascalCase-singleton) Use PascalCase when you export a constructor / class / singleton / function library / bare object.
- [23.8](#naming--PascalCase-singleton) Use PascalCase when you export-default a constructor / class / singleton / function library / bare object.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an incorrect change; PascalCase always applies to these cases, whether named or default exported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pardon me! I thought this rule was referring to naming the file when you export-default a class. The two rules immediately before refer to naming the file in such cases, and the example uses export-default. My mistake!

image

@DannyNemer DannyNemer closed this May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants