diff --git a/lib/rules/jsx-pascal-case.js b/lib/rules/jsx-pascal-case.js index 8bc892da46..8a8d0b2a46 100644 --- a/lib/rules/jsx-pascal-case.js +++ b/lib/rules/jsx-pascal-case.js @@ -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); @@ -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;