Skip to content

jsx-pascal-case warns on valid casing when using non-English characters #1654

Closed
@bjornreppen

Description

@bjornreppen

This rule only works when strictly using the 26 english characters hard coded in the regex.

const PASCAL_CASE_REGEX = /^([A-Z0-9]|[A-Z0-9]+[a-z0-9]+(?:[A-Z0-9]+[a-z0-9]))$/;

In order to support all cased languages, how do you feel about modifying the casing check for example using a technique similar to this (to detect letters):

function isLetter(c) {
  return c.toLowerCase() != c.toUpperCase();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions