async function cleanFile(file, platform = {}, vol = fs) {
  /** @type {Record<'warning'|'success', string[]>} */
  const cleanLogs = {
    warning: [],
    success: [],
  };
  let { destination } = file;

  if (typeof destination !== 'string') throw new Error('Please enter a valid destination');

  // if there is a clean path, prepend the destination with it
  if (platform.buildPath) {
    destination = join(platform.buildPath, destination);
  }
  destination = destination.replace(/\\/g, '/');

  if (!vol.existsSync(destination) && platform?.log?.verbosity !== silent) {
    cleanLogs.success.push(chalk.bold.red('!') + ' ' + destination + ', does not exist');
    return cleanLogs;
  }

  vol.unlinkSync(destination);
  if (platform?.log?.verbosity !== silent) {
    cleanLogs.success.push(chalk.bold.red('-') + ' ' + destination);
  }
  return cleanLogs;
}
Takes the style property object and a format and returns a
string that can be written to a file.
@memberOf StyleDictionary
@param {File} file
@param {PlatformConfig} [platform]
@param {Volume} [vol]