diff --git a/lib/rules/jsx-pascal-case.js b/lib/rules/jsx-pascal-case.js index 25589be96b..6425494b40 100644 --- a/lib/rules/jsx-pascal-case.js +++ b/lib/rules/jsx-pascal-case.js @@ -11,7 +11,7 @@ const elementType = require('jsx-ast-utils/elementType'); // Constants // ------------------------------------------------------------------------------ -const PASCAL_CASE_REGEX = /^([A-Z0-9]|[A-Z0-9]+[a-z0-9]+(?:[A-Z0-9]+[a-z0-9]*)*)$/; +const PASCAL_CASE_REGEX = /^(.*[.])*([A-Z]|[A-Z]+[a-z0-9]+(?:[A-Z0-9]+[a-z0-9]*)*)$/; const COMPAT_TAG_REGEX = /^[a-z]|\-/; const ALL_CAPS_TAG_REGEX = /^[A-Z0-9]+$/; diff --git a/tests/lib/rules/jsx-pascal-case.js b/tests/lib/rules/jsx-pascal-case.js index 06a7b93f80..71f094e676 100644 --- a/tests/lib/rules/jsx-pascal-case.js +++ b/tests/lib/rules/jsx-pascal-case.js @@ -51,6 +51,8 @@ ruleTester.run('jsx-pascal-case', rule, { options: [{allowAllCaps: true}] }, { code: '' + }, { + code: '' }, { code: '' }, {