Skip to content

Commit

Permalink
Merge pull request #30 from crissoca/feat/force-component-capitalize
Browse files Browse the repository at this point in the history
React components must start with a upper case letter.
  • Loading branch information
arminbro authored Dec 9, 2020
2 parents ba68a8d + 0815664 commit 4c3bddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/componentActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const chalk = require('chalk');
const { upperFirst } = require('lodash');
const {
componentTemplateTypes,
generateComponentTemplates,
Expand Down Expand Up @@ -29,7 +30,7 @@ function generateComponent(cmd, cliConfigFile, componentName) {
(cmd[componentTemplateType] && cmd[componentTemplateType].toString() === 'true') ||
componentTemplateType === componentTemplateTypes.COMPONENT
) {
const template = getComponentTemplate(cmd, cliConfigFile, componentName, componentTemplateType);
const template = getComponentTemplate(cmd, cliConfigFile, upperFirst(componentName), componentTemplateType);

if (template) {
componentTemplates.push(template);
Expand Down

0 comments on commit 4c3bddd

Please sign in to comment.