mozilla / eslint-plugin-no-unsanitized

Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike
Mozilla Public License 2.0
224 stars 34 forks source link

Bug expression.callee #10

Closed LockeLamora closed 7 years ago

LockeLamora commented 7 years ago

Opened up funcName to accept either values instead of just the property.name parameter by adding an OR condition

old method: funcName can be callee.name or property.name. this caused a failure if 'property' didn't exist so property.name couldn't be accessed

new method: if either callee.name or property.name exist, then proceed with normal logic to assign one of these to funcName

mozfreddyb commented 7 years ago

Your 3rd commit message made me smile because I fell into the same trap 👍