function expectSpaceBefore(token, pattern) {
			const prevToken = sourceCode.getTokenBefore(token);

			if (
				prevToken &&
				(CHECK_TYPE.test(prevToken.type) ||
					pattern.test(prevToken.value)) &&
				!isOpenParenOfTemplate(prevToken) &&
				!tokensToIgnore.has(prevToken) &&
				astUtils.isTokenOnSameLine(prevToken, token) &&
				!sourceCode.isSpaceBetweenTokens(prevToken, token)
			) {
				context.report({
					loc: token.loc,
					messageId: "expectedBefore",
					data: token,
					fix(fixer) {
						return fixer.insertTextBefore(token, " ");
					},
				});
			}
		}
Reports a given token if there are not space(s) before the token.
@param {Token} token A token to report.
@param {RegExp} pattern A pattern of the previous token to check.
@returns {void}