-
Notifications
You must be signed in to change notification settings - Fork 0
Decision: Filenames shall be dash-case'd. #29
Comments
I think dashed-case should be the default, PascalCase allowed for React components, and camelCase allowed if the file is being exported and the export name matches the filename. |
* Update `eslint-config-formidable` to get proper `filenames` rules. * Add overrides for `filenames` pending FormidableLabs/eslint-config-formidable#29 * Fix incorrect match export name. * Implement `package.json:scripts.test`
Anything case-sensitive will be an issue for Mac users. This just came up with a client of ours. File was named Strongly recommend staying away from case-sensitive filename patterns. |
I've repeatedly encountered @divmain 's anecdote on our largest client projects. Basically, I think the And, anecdotally, right out of the gate, @jevakallio 's new project had an issue wherein the casing of the ES6 class didn't match the filename. (Fortunately, the class name was wrong I think, so we didn't have to recase the file, just the code.) But, it underscores that situations implicating case changing occur frequently enough to be a pain. I second @divmain 's suggestion that we
|
I'm going to chime in and recommend all dash case, all the time. Capital case react component naming never really made sense to me. The |
OK, I'm designating: DECISION: Formidable is "all dash-case, all the time".
OPEN ISSUE: @kylecesmat / everyone else. If we want to further discuss the |
Wanting to create a forum to talk about filename casing, postfixing, & best patterns.
I understand there are pitfalls associated with pascal/camel-casing and case-sensetive filesystems, however there does seem to be a lot of support in the React community for
ComponentName
filenames. The naming translates well into component use inside JSX. Projects like airbnb-eslint-config & React Core have adopted this kind of naming.Other considerations such as
component-name.react.js
andcomponent-name.ios.js
postfixing should be accounted for as well in filename discussions.The text was updated successfully, but these errors were encountered: