@deepvision/eslint-plugin

中文文档
2.1.0发布于 2026/11/10MITTypeScriptES Module构建来源已验证近 30 天下载 4123

This package provides ready-to-use ESLint configs for both backend (Node.js) and frontend (Vue.js) projects.

原始使用文档
文档目录10 节
  1. Features
  2. Installation
  3. Usage
  4. Backend / Node.js Projects
  5. Frontend / Vue.js Projects
  6. Oxlint + Oxfmt (Vite+)
  7. package.json Scripts
  8. What's Included
  9. Running ESLint
  10. License

DeepVision ESLint Configs

This package provides ready-to-use ESLint configs for both backend (Node.js) and frontend (Vue.js) projects.

Features

  • All-in-one solution: No need to install ESLint or any plugins separately - everything is included
  • TypeScript support: Built-in TypeScript linting with typescript-eslint
  • Stylistic rules: Consistent code formatting with @stylistic/eslint-plugin
  • Vue.js support: Complete Vue 3 linting configuration
  • Node.js support: Optimized rules for backend Node.js projects
  • ESLint 9+ compatible: Uses the new flat config format
  • Oxlint + Oxfmt presets: The same rules for Oxlint and Oxfmt (@deepvision/eslint-plugin/oxc), plus a .vue-templates-only ESLint config

Installation

npm install --save-dev @deepvision/eslint-plugin

This package includes all necessary dependencies. No additional installation of eslint, typescript-eslint, eslint-plugin-vue, or any other ESLint-related packages is required.

Usage

Create an eslint.config.js file in your project root and import the appropriate configuration.

For CommonJS projects use eslint.config.mjs, to suppress warning Module type of eslint.config.js is not specified

Backend / Node.js Projects

For backend Node.js projects (NestJS, Express, etc.):

import deepEslint, { defineConfig } from '@deepvision/eslint-plugin';

export default defineConfig([
  deepEslint.configs.node,
]);

Frontend / Vue.js Projects

For frontend Vue.js projects:

import deepEslint, { defineConfig } from '@deepvision/eslint-plugin';

export default defineConfig([
  deepEslint.configs.vue,
]);

Oxlint + Oxfmt (Vite+)

The same presets, for projects that lint with Oxlint and format with Oxfmt — for example through Vite+ (vp lint, vp fmt). Oxlint is roughly 50–100× faster than ESLint on the same rules.

  • oxlint() — every JS/TS rule of the node and vue presets, rule for rule (a test compares it to the ESLint presets' effective config).
  • oxfmt — the formatting half of the presets (@stylistic) as a Prettier-compatible formatter config, printWidth: 120.
  • configs.vueTemplates — the one thing Oxlint cannot do yet: Vue template rules (eslint-plugin-vue) and no-unused-vars in <script setup>. ESLint lints .vue files only, with the layout rules switched off so they do not fight Oxfmt.

vite.config.ts:

import { oxfmt, oxlint } from '@deepvision/eslint-plugin/oxc';
import { defineConfig } from 'vite-plus';

export default defineConfig({
  // Monorepo: say which globs are `node` and which are `vue`.
  lint: oxlint({
    node: ['apps/api/**'],
    vue: ['apps/app/**', 'libs/ui/**'],
    // Project overrides go after the preset's own.
    overrides: [
      { files: ['apps/api/**'], rules: { 'typescript/no-non-null-assertion': 'off' } },
    ],
  }),
  fmt: oxfmt,
});

A single Vue app is oxlint({ vue: ['**'] }). Without Vite+, write the same objects to .oxlintrc.json / .oxfmtrc.json.

eslint.config.js of a package with .vue files:

import deepEslint, { defineConfig } from '@deepvision/eslint-plugin';

export default defineConfig([
  deepEslint.configs.vueTemplates,
]);
{
  "scripts": {
    "lint": "vp lint --fix src && eslint src --fix && vp fmt src"
  }
}

Rule names in Oxlint: typescript/* for @typescript-eslint/*, and the typescript-eslint extension rules keep their core name (no-unused-vars).

Not covered by the Oxc presets:

  • @stylistic/padding-line-between-statements (blank line before return): Oxfmt keeps blank lines but never adds one, and Oxlint has no such rule.
  • The vue preset's ignore of src/graphql/**/*.ts: add it to ignorePatterns yourself.

package.json Scripts

Add linting scripts to your package.json:

{
  "scripts": {
    "lint": "eslint",
    "lint:fix": "eslint --fix"
  }
}

What's Included

This package includes all necessary dependencies:

  • eslint - The core ESLint linter
  • @eslint/js - ESLint's recommended JavaScript rules
  • typescript-eslint - TypeScript support for ESLint
  • @stylistic/eslint-plugin - Stylistic formatting rules
  • eslint-plugin-vue - Vue.js linting rules

You don't need to install any of these separately!

Running ESLint

After setup, you can run ESLint using:

# Check for linting errors
npm run lint

# Automatically fix issues
npm run lint:fix

License

MIT

版本与发布记录

@deepvision/eslint-plugin 共发布 69 个版本,首次发布于 2022/05/17;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.1.0latest2026/11/101 天前
2.0.42026/05/185 个月前
2.0.32026/04/146 个月前
2.0.22026/03/267 个月前
2.0.12026/03/207 个月前
2.0.02026/03/207 个月前

其他发布通道:rc → 2.0.0-rc.10。

关于 @deepvision/eslint-plugin 的常见问题

@deepvision/eslint-plugin 是什么?

This package provides ready-to-use ESLint configs for both backend (Node.js) and frontend (Vue.js) projects.

如何安装 @deepvision/eslint-plugin?

在项目目录运行 npm install @deepvision/eslint-plugin,或使用 pnpm add / yarn add / bun add。

@deepvision/eslint-plugin 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@deepvision/eslint-plugin 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@deepvision/eslint-plugin 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js 24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@deepvision/eslint-plugin 可以商用吗?

@deepvision/eslint-plugin 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@deepvision/eslint-plugin 的下载量有多少?

根据 npm 官方下载统计,@deepvision/eslint-plugin 在 2026/10/12 – 2026/11/10 这 30 天内被下载 4,123 次,日均约 137 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deepvision/eslint-plugin 还在维护吗?

最新版本 2.1.0 发布于 2026/11/10(1 天前);至今共发布 69 个版本,其中过去 12 个月发布了 16 个;首次发布于 2022/05/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。