function findConfigFile() {
	var contents;
	var child;
	var dir;
	var i;

	dir = cwd();
	do {
		contents = readDir( dir );
		if ( contents instanceof Error ) {
			throw contents;
		}
		for ( i = 0; i < contents.length; i++ ) {
			if ( contents[ i ] === RTLINTRC ) {
				return resolve( dir, contents[ i ] );
			}
		}
		child = dir;

		// Get parent directory:
		dir = dirname( dir );
		if ( dir === child ) {
			return null;
		}
	} while ( true );
}
Searches for a `.rlintrc` file in the current working directory and all its parent directories.

@private
@returns {(string|null)} full path of `.rlintrc` or `null` if not found