2 * @fileoverview Prevent React to be marked as unused
7 var variableUtil = require('../util/variable');
9 // ------------------------------------------------------------------------------
11 // ------------------------------------------------------------------------------
13 var JSX_ANNOTATION_REGEX = /^\*\s*@jsx\s+([^\s]+)/;
15 module.exports = function(context) {
19 // --------------------------------------------------------------------------
21 // --------------------------------------------------------------------------
25 JSXOpeningElement: function() {
26 variableUtil.markVariableAsUsed(context, id);
29 BlockComment: function(node) {
30 var matches = JSX_ANNOTATION_REGEX.exec(node.value);
34 id = matches[1].split('.')[0];