🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@deppon/deppon-eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deppon/deppon-eslint-config

ESLint shared config for Vue 3 + TypeScript projects

latest
npmnpm
Version
2.5.13
Version published
Weekly downloads
186
12.73%
Maintainers
1
Weekly downloads
 
Created
Source

@deppon/deppon-eslint-config

Vue 3 + TypeScript 项目 eslint 通用配置

特性

  • ESLint: ✅
  • TypeScript
  • Vue 3: ✅
  • Prettier: ✅

安装

npm install @deppon/deppon-eslint-config -D

使用

在你项目的根目录添加 .eslintrc 文件,添加以下配置

{
  "extends": "@deppon/deppon-eslint-config"
}

也可以在添加其他配置去覆盖 @deppon/deppon-eslint-config 的某些默认配置,详见 Shareable Configs

格式化

如果想要配合编辑器完成保存即自动修复,可以在根目录的 .vscode 文件夹的 settings.json 文件中配置以下代码

{
    "typescript.tsdk": "node_modules/typescript/lib",
    "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
    "eslint.options": {
        "extensions": [".js", ".jsx", ".ts", ".tsx", ".vue"]
    },
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "editor.formatOnSave": true,
    "[javascript]": {
        "editor.formatOnSave": false
    },
    "[javascriptreact]": {
        "editor.formatOnSave": false
    },
    "[typescript]": {
        "editor.formatOnSave": false
    },
    "[typescriptreact]": {
        "editor.formatOnSave": false
    },
    "[vue]": {
        "editor.formatOnSave": false
    }
}

如果想配置整个项目的校验或格式化,添加以下脚本代码到 package.json

"scripts": {
  "lint": "eslint . --ext js,ts,tsx,vue",
  "format": "prettier --write **/*.{js,ts,tsx,vue} && eslint . --ext js,ts,tsx,vue --fix"
}

FAQs

Package last updated on 16 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts