We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dc03975 + 3ad837f commit fa51017Copy full SHA for fa51017
lib/rules/no-unescaped-entities.js
@@ -35,7 +35,7 @@ module.exports = {
35
},
36
37
create: function(context) {
38
- function isInvalidEntity(node) {
+ function reportInvalidEntity(node) {
39
var configuration = context.options[0] || {};
40
var entities = configuration.forbid || DEFAULTS;
41
@@ -70,9 +70,7 @@ module.exports = {
70
return {
71
Literal: function(node) {
72
if (node.type === 'Literal' && node.parent.type === 'JSXElement') {
73
- if (isInvalidEntity(node)) {
74
- context.report(node, 'HTML entities must be escaped.');
75
- }
+ reportInvalidEntity(node);
76
}
77
78
};
0 commit comments