Skip to content

Commit

Permalink
Remove destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
yacinehmito committed May 9, 2020
1 parent 57c8ebb commit 9c4467a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rules/jsx-pascal-case.js
Expand Up @@ -28,7 +28,7 @@ function testPascalCase(name) {
if (!testUpperCase(name.charAt(0))) {
return false;
}
const {length} = name;
const length = name.length;
let atLeastOneLowerCase = false;
for (let i = 1; i < length; i += 1) {
const char = name.charAt(i);
Expand All @@ -43,7 +43,7 @@ function testPascalCase(name) {
}

function testAllCaps(name) {
const {length} = name;
const length = name.length;
const firstChar = name.charAt(0);
if (!(testUpperCase(firstChar) || testDigit(firstChar))) {
return false;
Expand Down

0 comments on commit 9c4467a

Please sign in to comment.