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

Conversation

Projects
None yet
2 participants
@DannyNemer
Copy link
Contributor

commented May 1, 2019

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).

[guide] Fix description of rule 23.8 to specify `export-default`
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.

This comment has been minimized.

Copy link
@ljharb

ljharb May 1, 2019

Member

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

This comment has been minimized.

Copy link
@DannyNemer

DannyNemer May 2, 2019

Author Contributor

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
You can’t perform that action at this time.