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

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

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

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

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

		if (
			( node.type === 'CallExpression' || node.type === 'NewExpression' ) &&
			node.arguments.length > 0
		) {
			args = node.arguments;
			lastElem = args[ args.length - 1 ];
			if (
				lastElem.type === 'ObjectExpression' &&
				lastElem.properties.length > 0
			) {
				prevToken = source.getLastToken( lastElem );
				tokenAfter = source.getTokenAfter( prevToken );
				if (
					prevToken.loc.end.line === tokenAfter.loc.end.line &&
					source.isSpaceBetween( prevToken, tokenAfter )
				) {
					report( node, prevToken, tokenAfter );
				}
			} else if (
				lastElem.type === 'ArrayExpression' &&
				lastElem.elements.length > 0
			) {
				elem = lastElem.elements[ lastElem.elements.length - 1 ];
				if (
					elem.type === 'ObjectExpression' &&
					elem.properties.length > 0
				) {
					prevToken = source.getLastToken( lastElem );
					tokenAfter = source.getTokenAfter( prevToken );
					if (
						prevToken.loc.end.line === tokenAfter.loc.end.line &&
						source.isSpaceBetween( prevToken, tokenAfter )
					) {
						report( node, prevToken, tokenAfter );
					}
				} else {
					prevToken = source.getLastToken( lastElem );
					tokenBefore = source.getTokenBefore( prevToken );
					tokenAfter = source.getTokenAfter( prevToken );
					if (
						tokenBefore.loc.end.line !== prevToken.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[ node.elements.length - 1 ];
			if (
				elem.type === 'ObjectExpression' &&
				elem.properties.length > 0
			) {
				prevToken = source.getLastToken( elem );
				tokenAfter = source.getTokenAfter( prevToken );
				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 a closing parenthesis or bracket and a nested object or array expression at the beginning of a line.

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