API 参考
    正在准备搜索索引...

    函数 defineVipEslintConfig

    • 定义 Eslint 配置

      参考:https://github.com/antfu/eslint-config

      实现要点:

      • antfu(options, ...userConfigs) 第一参是 antfu 全局 options;第二参起是 userConfigs(flat config 数组项)
      • 旧实现把 defaultEslintConfig 写死作为第一参,导致 options.markdown 等覆盖不生效
      • 新实现 antfu({ ...defaultEslintConfig, ...options }, ...) —— 调用方可通过 options 覆盖 default 字段(向后兼容)
      • 末尾追加 markdownCodeBlockOverrides:针对 markdown 内 ts/js 代码块的规则降级

      参数

      • options: EslintConfigOptions = {}

      返回 Promise<TypedFlatConfigItem[]>