Skip to content

Commit 4ba1cba

Browse files
committed
lint
1 parent 2599d2a commit 4ba1cba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rules/no-inner-html.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ module.exports = {
1111
create(context) {
1212
return {
1313
AssignmentExpression(node) {
14-
if (node.operator === "=") {
15-
const leftNode = node.left;
16-
const rightNode = node.right;
14+
if (node.operator === '=') {
15+
const leftNode = node.left
16+
const rightNode = node.right
1717

1818
if (leftNode.property && leftNode.property.name === 'innerHTML') {
1919
if (rightNode.type === 'Literal' && rightNode.value === '') {
2020
return
2121
}
2222

2323
context.report({
24-
node: node,
24+
node,
2525
message:
2626
'Using innerHTML poses a potential security risk and should not be used other than cleaning content.'
2727
})

0 commit comments

Comments
 (0)