function findEslintEnv(text) {
	let match, retv;

	eslintEnvPattern.lastIndex = 0;

	while ((match = eslintEnvPattern.exec(text)) !== null) {
		if (match[0].endsWith("*/")) {
			retv = Object.assign(
				retv || {},
				commentParser.parseListConfig(
					commentParser.parseDirective(match[0].slice(2, -2)).value,
				),
			);
		}
	}

	return retv;
}
Checks whether or not there is a comment which has "eslint-env *" in a given text.
@param {string} text A source code text to check.
@returns {Object|null} A result of parseListConfig() with "eslint-env *" comment.