This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Incorrect RegExp in export-name rule leads to superfluously permissive #632
Labels
Difficulty: Medium
People with non-trivial experience in TSLint should be able to send a pull request for this issue.
Status: Accepting PRs
Type: Breaking Change
Type: Bug
Milestone
As was discovered in #623 (comment) RegExp in
export-name
rule has issue with improperly escaped.
as well as missing check for line start/end. These problems leads to several problems.For class name
SomeClass
it allows:.
escape:SomeClassButAnyTextHere.tsx
,SomeClassWithoutExtension
SomeClass.ts.or.not
LooksLikeSomeClass.ts
NotSureThatSomeClassIsSomewhereInThis.long.filename
According to description I would expect only
SomeClass.ts
or at leastSomeClass.suffix.tsx
(but better to make it as option).Existing test with a problem ExportNameRulePassingTestInput2.tsx ends on
2.tsx
but class name doesn't have2
et the end.What do you think about cases above and which should be disallowed by this rule?
The text was updated successfully, but these errors were encountered: