function main( context ) {
	/**
	* Reports the error message.
	*
	* @private
	* @param {ASTNode} node - node to report
	*/
	function report( node ) {
		context.report({
			'node': node,
			'message': 'Export statements should appear at the end of the file'
		});
	}

	/**
	* Checks whether export statements appear at the end of a file.
	*
	* @private
	* @param {ASTNode} node - node to examine
	*/
	function validate( node ) {
		var lastIndex;
		var body;
		var item;
		var i;

		body = node.body;
		lastIndex = -1;

		// Find the last non-export statement...
		for ( i = body.length-1; i >= 0; i-- ) {
			item = body[ i ];
			if ( !isExportStatement( item ) ) {
				lastIndex = i;
				break;
			}
		}
		// Report any export statements occurring from the beginning of the program until the last non-export statement...
		if ( lastIndex !== -1 ) {
			for ( i = 0; i < lastIndex; i++ ) {
				item = body[ i ];
				if ( isExportStatement( item ) ) {
					report( item );
				}
			}
		}
	}

	return {
		'Program': validate
	};
}
Rule for validating that export statements appear at the end of a file.

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