function main( context ) {
	/**
	* Reports the error message.
	*
	* @private
	* @param {ASTNode} node - node to report
	*/
	function report( node ) {
		context.report({
			'node': node,
			'message': 'do not explicitly require `index.<ext>` files',
			'fix': fix
		});

		/**
		* Fixes the lint error.
		*
		* @private
		* @param {Function} fixer - ESLint fixer
		* @returns {(Object|null)} fix or null
		*/
		function fix( fixer ) {
			var value = node.arguments[ 0 ].value;
			value = value.replace( RE_INDEX, '' );
			return fixer.replaceText( node.arguments[ 0 ], '\''+value+'\'' );
		}
	}

	/**
	* Validates a `require` path.
	*
	* @private
	* @param {ASTNode} node - node to examine
	*/
	function validate( node ) {
		var requirePath;
		if ( node.callee.name === 'require' ) {
			requirePath = node.arguments[ 0 ].value;
			if ( RE_INDEX.test( requirePath ) ) {
				report( node );
			}
		}
	}

	return {
		'CallExpression': validate
	};
}
Rule for validating that `require` calls do not explicitly require `index.<ext>` files.

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