src/main/options-normalizer.js/getFlagSchema
const getFlagSchema = ({ colorsModule, levenshteinDistance }) =>
  class FlagSchema extends vnopts.ChoiceSchema {
    constructor({ name, flags }) {
      super({ name, choices: flags });
      this._flags = [...flags].sort();
    }
    preprocess(value, utils) {
      if (
        typeof value === "string" &&
        value.length > 0 &&
        !this._flags.includes(value)
      ) {
        const suggestion = this._flags.find(
          (flag) => levenshteinDistance(flag, value) < 3
        );
        if (suggestion) {
          utils.logger.warn(
            [
              `Unknown flag ${colorsModule.yellow(
                utils.descriptor.value(value)
              )},`,
              `did you mean ${colorsModule.blue(
                utils.descriptor.value(suggestion)
              )}?`,
            ].join(" ")
          );
          return suggestion;
        }
      }
      return value;
    }
    expected() {
      return "a flag";
    }
  };