isTargetPath(filePath, providedConfig) {
		const { configArrayFactory, extensionRegExp } =
			internalSlotsMap.get(this);

		// If `--ext` option is present, use it.
		if (extensionRegExp) {
			return extensionRegExp.test(filePath);
		}

		// `.js` file is target by default.
		if (filePath.endsWith(".js")) {
			return true;
		}

		// use `overrides[].files` to check additional targets.
		const config =
			providedConfig ||
			configArrayFactory.getConfigArrayForFile(filePath, {
				ignoreNotFoundError: true,
			});

		return config.isAdditionalTargetPath(filePath);
	}
Check if a given file is target or not.
@param {string} filePath The path to a candidate file.
@param {ConfigArray} [providedConfig] Optional. The configuration for the file.
@returns {boolean} `true` if the file is a target.