function main( context ) {
	var options;
	var source;
	var opts;

	opts = copy( DEFAULTS );
	options = context.options[ 0 ];
	if ( hasOwnProp( options, 'tags' ) ) {
		opts.tags = options.tags;
	}
	source = context.getSourceCode();

	return {
		'FunctionExpression:exit': validate,
		'FunctionDeclaration:exit': validate,
		'VariableDeclaration:exit': validate,
		'ExpressionStatement:exit': validate
	};

	/**
	* Checks whether JSDoc comments contain only allowed JSDoc tags.
	*
	* @private
	* @param {ASTNode} node - AST node
	*/
	function validate( node ) {
		var jsdoc;
		var tags;
		var ast;
		var i;

		jsdoc = findJSDoc( source, node );
		if ( isObject( jsdoc ) ) {
			ast = parseJSDoc( jsdoc.value, DOPTS );
			tags = ast.tags;
			for ( i = 0; i < tags.length; i++ ) {
				if ( !contains( opts.tags, tags[ i ].title ) ) {
					report( tags[ i ].title, jsdoc.loc );
				}
			}
		}
	}

	/**
	* Reports the error message.
	*
	* @private
	* @param {string} tag - name of unknown tag
	* @param {Object} loc - lines of code (object with `start` and `end` properties)
	*/
	function report( tag, loc ) {
		var msg = '"'+tag+'" is not one of the allowed tags ("'+opts.tags.join( '","' )+'")';
		context.report({
			'node': null,
			'message': msg,
			'loc': loc
		});
	}
}
Rule for validating that JSDoc comments contain only allowed JSDoc tags.

@param {Object} context - ESLint context
@returns {Object} validators