Skip to content

Utils.convertStringToRegex method removes the last character from a RegExp string. #416

@K1ll3rF0x

Description

@K1ll3rF0x

When defining e.g. a rule: "angular/controller-name": [2, '/^Prefix[A-Z][a-zA-Z0-9]*Suffix$/']
A controller name such as 'PrefixBananaSuffixasdf' does not produce errors.

This seems to be caused by a bug in utils.convertStringToRegex function, that removes the last character from the regexp string, in this case the dollar sign.

Version: 1.4.1.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions