scripts/utils/generate-schema.js/optionToSchema
function optionToSchema(option) {
  let schema;
  if (option.type === "choice") {
    const choicesSchema = option.choices.map(choiceToSchema);
    let key = "oneOf";
    if (option.name === "parser") {
      // To support custom parser
      //   ref: https://github.com/SchemaStore/schemastore/pull/1636
      choicesSchema.push({ type: "string", description: "Custom parser" });
      // We should use "anyOf" for "parser" option.
      //   ref: https://github.com/SchemaStore/schemastore/pull/1642
      key = "anyOf";
    }
    schema = { [key]: choicesSchema };
  } else {
    schema = { type: optionTypeToSchemaType(option.type) };
  }
  if (option.array) {
    schema = wrapWithArraySchema(schema);

    // #10274
    if (option.name === "pluginSearchDirs") {
      schema = {
        oneOf: [
          schema,
          {
            enum: [false],
            description: "Disable plugin autoloading.",
          },
        ],
      };
    }
  }
  return {
    description: option.description,
    default: option.default,
    ...schema,
  };
}