Skip to content

Lint 配置

vp lintvp checkvite.config.ts 中的 lint 块读取 Oxlint 设置。详细信息请参考 Oxlint 的配置文档

示例

ts
import { defineConfig } from 'vite-plus';

export default defineConfig({
  lint: {
    ignorePatterns: ['dist/**'],
    options: {
      typeAware: true,
      typeCheck: true,
    },
    rules: {
      'no-console': ['error', { allow: ['error'] }],
    },
  },
});

我们建议同时启用 options.typeAwareoptions.typeCheck,这样 vp lintvp check 就可以使用完整的类型感知路径。