setCachedLintResults(filePath, config, result) {
		if (result && Object.hasOwn(result, "output")) {
			return;
		}

		const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);

		if (fileDescriptor && !fileDescriptor.notFound) {
			debug(`Updating cached result: ${filePath}`);

			// Serialize the result, except that we want to remove the file source if present.
			const resultToSerialize = Object.assign({}, result);

			/*
			 * Set result.source to null.
			 * In `getCachedLintResults`, if source is explicitly null, we will
			 * read the file from the filesystem to set the value again.
			 */
			if (Object.hasOwn(resultToSerialize, "source")) {
				resultToSerialize.source = null;
			}

			fileDescriptor.meta.results = resultToSerialize;
			fileDescriptor.meta.hashOfConfig = hashOfConfigFor(config);
		}
	}
Set the cached lint results for a given file path, after removing any
information that will be both unnecessary and difficult to serialize.
Avoids caching results with an "output" property (meaning fixes were
applied), to prevent potentially incorrect results if fixes are not
written to disk.
@param {string} filePath The file for which to set lint results.
@param {ConfigArray} config The config of the file.
@param {Object} result The lint result to be set for the file.
@returns {void}