Skip to content

Commit a42aaec

Browse files
committed
merge 314
2 parents 839f1a6 + 1cffa9f commit a42aaec

File tree

4 files changed

+86
-20
lines changed

4 files changed

+86
-20
lines changed

lib/rules/no-raw-text.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ function create(context) {
4949

5050
const hasOnlyLineBreak = (value) => /^[\r\n\t\f\v]+$/.test(value.replace(/ /g, ''));
5151

52-
const scope = context.getScope();
53-
const getValidation = (node) => !allowedElements.some((el) => new RegExp(`^${el}$`).test(elementName(node.parent, scope)));
52+
const getValidation = (node) => !hasAllowedParent(node.parent, allowedElements);
5453

5554
return {
5655
Literal(node) {

0 commit comments

Comments
 (0)