function main( context ) {
	var source = context.getSourceCode();

	/**
	* Reports the error message.
	*
	* @private
	* @param {ASTNode} node - node to report
	* @param {Object} prevToken - token before the space
	* @param {Object} tokenAfter - token after the space
	*/
	function report( node, prevToken, tokenAfter ) {
		context.report({
			'node': node,
			'message': 'No spaces allowed between an opening parenthesis or bracket and a nested object or array expression at the end of a line',
			'fix': fix
		});

		/**
		* Fixes lint the error by removing the space before the object or array expression.
		*
		* @private
		* @param {Object} fixer - ESLint fixer
		* @returns {Object} fix
		*/
		function fix( fixer ) {
			var afterIdx;
			var prevIdx;

			prevIdx = source.getIndexFromLoc( prevToken.loc.end );
			afterIdx = source.getIndexFromLoc( tokenAfter.loc.start );
			return fixer.replaceTextRange( [ prevIdx, afterIdx ], '' );
		}
	}

	/**
	* Checks whether there are spaces present between an opening parenthesis or bracket and a nested object or array expression at the end of a line.
	*
	* @private
	* @param {ASTNode} node - node to examine
	*/
	function validate( node ) {
		var tokenAfter;
		var nextToken;
		var prevToken;
		var elem;
		var args;

		if (
			( node.type === 'CallExpression' || node.type === 'NewExpression' ) &&
			node.arguments.length > 0
		) {
			args = node.arguments;
			if (
				args[ 0 ].type === 'ObjectExpression' &&
				args[ 0 ].properties.length > 0
			) {
				prevToken = source.getTokenBefore( args[ 0 ] );
				tokenAfter = source.getFirstToken( args[ 0 ] );
				if (
					prevToken.loc.end.line === tokenAfter.loc.end.line &&
					source.isSpaceBetween( prevToken, tokenAfter )
				) {
					report( node, prevToken, tokenAfter );
				}
			} else if (
				args[ 0 ].type === 'ArrayExpression' &&
				args[ 0 ].elements.length > 0
			) {
				elem = args[ 0 ].elements[ 0 ];
				if (
					elem.type === 'ObjectExpression' &&
					elem.properties.length > 0
				) {
					prevToken = source.getTokenBefore( args[ 0 ] );
					tokenAfter = source.getFirstToken( args[ 0 ] );
					if (
						prevToken.loc.end.line === tokenAfter.loc.end.line &&
						source.isSpaceBetween( prevToken, tokenAfter )
					) {
						report( node, prevToken, tokenAfter );
					}
				} else {
					prevToken = source.getTokenBefore( args[ 0 ] );
					tokenAfter = source.getFirstToken( args[ 0 ] );
					nextToken = source.getTokenAfter( tokenAfter );
					if (
						tokenAfter.loc.end.line !== nextToken.loc.end.line &&
						prevToken.loc.end.line === tokenAfter.loc.end.line &&
						source.isSpaceBetween( prevToken, tokenAfter )
					) {
						report( node, prevToken, tokenAfter );
					}
				}
			}
		}

		if (
			node.type === 'ArrayExpression' &&
			node.elements.length > 0
		) {
			elem = node.elements[ 0 ];
			if (
				elem.type === 'ObjectExpression' &&
				elem.properties.length > 0
			) {
				prevToken = source.getFirstToken( node );
				tokenAfter = source.getFirstToken( elem );

				if (
					prevToken.loc.end.line === tokenAfter.loc.end.line &&
					source.isSpaceBetween( prevToken, tokenAfter )
				) {
					report( node, prevToken, tokenAfter );
				}
			}
		}
	}

	return {
		'CallExpression': validate,
		'NewExpression': validate,
		'ArrayExpression': validate
	};
}
Rule for validating that no spaces are present between an opening parenthesis or bracket and a nested object or array expression at the end of a line.

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