function checkForEmptyLine(token, opts) {
			if (
				applyDefaultIgnorePatterns &&
				defaultIgnoreRegExp.test(token.value)
			) {
				return;
			}

			if (ignorePattern && customIgnoreRegExp.test(token.value)) {
				return;
			}

			let after = opts.after,
				before = opts.before;

			const prevLineNum = token.loc.start.line - 1,
				nextLineNum = token.loc.end.line + 1,
				commentIsNotAlone = codeAroundComment(token);

			const blockStartAllowed =
					options.allowBlockStart &&
					isCommentAtBlockStart(token) &&
					!(
						options.allowClassStart === false &&
						isCommentAtClassStart(token)
					),
				blockEndAllowed =
					options.allowBlockEnd &&
					isCommentAtBlockEnd(token) &&
					!(
						options.allowClassEnd === false &&
						isCommentAtClassEnd(token)
					),
				classStartAllowed =
					options.allowClassStart && isCommentAtClassStart(token),
				classEndAllowed =
					options.allowClassEnd && isCommentAtClassEnd(token),
				objectStartAllowed =
					options.allowObjectStart && isCommentAtObjectStart(token),
				objectEndAllowed =
					options.allowObjectEnd && isCommentAtObjectEnd(token),
				arrayStartAllowed =
					options.allowArrayStart && isCommentAtArrayStart(token),
				arrayEndAllowed =
					options.allowArrayEnd && isCommentAtArrayEnd(token);

			const exceptionStartAllowed =
				blockStartAllowed ||
				classStartAllowed ||
				objectStartAllowed ||
				arrayStartAllowed;
			const exceptionEndAllowed =
				blockEndAllowed ||
				classEndAllowed ||
				objectEndAllowed ||
				arrayEndAllowed;

			// ignore top of the file and bottom of the file
			if (prevLineNum < 1) {
				before = false;
			}
			if (nextLineNum >= numLines) {
				after = false;
			}

			// we ignore all inline comments
			if (commentIsNotAlone) {
				return;
			}

			const previousTokenOrComment = sourceCode.getTokenBefore(token, {
				includeComments: true,
			});
			const nextTokenOrComment = sourceCode.getTokenAfter(token, {
				includeComments: true,
			});

			// check for newline before
			if (
				!exceptionStartAllowed &&
				before &&
				!commentAndEmptyLines.has(prevLineNum) &&
				!(
					astUtils.isCommentToken(previousTokenOrComment) &&
					astUtils.isTokenOnSameLine(previousTokenOrComment, token)
				)
			) {
				const lineStart = token.range[0] - token.loc.start.column;
				const range = [lineStart, lineStart];

				context.report({
					node: token,
					messageId: "before",
					fix(fixer) {
						return fixer.insertTextBeforeRange(range, "\n");
					},
				});
			}

			// check for newline after
			if (
				!exceptionEndAllowed &&
				after &&
				!commentAndEmptyLines.has(nextLineNum) &&
				!(
					astUtils.isCommentToken(nextTokenOrComment) &&
					astUtils.isTokenOnSameLine(token, nextTokenOrComment)
				)
			) {
				context.report({
					node: token,
					messageId: "after",
					fix(fixer) {
						return fixer.insertTextAfter(token, "\n");
					},
				});
			}
		}
Checks if a comment token has lines around it (ignores inline comments)
@param {token} token The Comment token.
@param {Object} opts Options to determine the newline.
@param {boolean} opts.after Should have a newline after this line.
@param {boolean} opts.before Should have a newline before this line.
@returns {void}