Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Make import-name camelCase begin with lower-case
Browse files Browse the repository at this point in the history
  • Loading branch information
dosentmatter committed Jul 19, 2019
1 parent df275d5 commit 6bda5d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/importNameRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ function walk(ctx: Lint.WalkContext<Option>) {
}

function makeCamelCase(input: string): string {
return input.replace(
let result = `${input.charAt(0)}${input.slice(1)}`;
result = result.replace(
/[-|\.|_](.)/g, // tslint:disable-next-line:variable-name
(_match: string, group1: string): string => {
return group1.toUpperCase();
}
);
return result;
}

function makePascalCase(input: string): string {
Expand Down

0 comments on commit 6bda5d1

Please sign in to comment.