function checkPropertyAccess(node,objectName,propertyName){if(propertyName===null){return;}var matchedObject=restrictedProperties.get(objectName);var matchedObjectProperty=matchedObject?matchedObject.get(propertyName):globallyRestrictedObjects.get(objectName);var globalMatchedProperty=globallyRestrictedProperties.get(propertyName);if(matchedObjectProperty){var message=matchedObjectProperty.message?" "+matchedObjectProperty.message:"";// eslint-disable-next-line eslint-plugin/report-message-format
context.report({node:node,message:"'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",data:{objectName:objectName,propertyName:propertyName,message:message}});}else if(globalMatchedProperty){var _message=globalMatchedProperty.message?" "+globalMatchedProperty.message:"";// eslint-disable-next-line eslint-plugin/report-message-format
context.report({node:node,message:"'{{propertyName}}' is restricted from being used.{{message}}",data:{propertyName:propertyName,message:_message}});}}
Checks to see whether a property access is restricted, and reports it if so.
@param {ASTNode} node The node to report
@param {string} objectName The name of the object
@param {string} propertyName The name of the property
@returns {undefined}