eslint vscode 配置

本文介绍如何在VSCode中安装并配置ESLint,包括设置用户偏好、启用自动修复功能,以及对JavaScript、React和Vue文件进行代码检查。同时分享了详细的VSCode设置JSON代码,涵盖字体、缩进、搜索排除、主题等全方位配置。

安装这俩东西

安装Eslint      npm install eslint -g

然后vsCode 首选项设置  用户设置   然后把老子的代码粘贴一下  

{
    "breadcrumbs.enabled": true,
    "editor.tabSize": 2,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "editor.minimap.renderCharacters": false,
    "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
    "editor.fontLigatures": true,
    "explorer.confirmDragAndDrop": false,
    "extensions.autoUpdate": false,
    "files.insertFinalNewline": true,
    "git.autofetch": true,
    "git.path": "F:\\Program Files\\Git\\cmd\\git.exe",
    "search.exclude": {
      "**/node_modules": true,
      "**/dist": true
    },
    "typescript.locale": "en",
    "window.titleBarStyle": "custom",
    "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
    "workbench.activityBar.visible": true,
    "workbench.colorTheme": "Plastic - deprioritised punctuation",
    "workbench.iconTheme": "vscode-great-icons",
    "workbench.startupEditor": "newUntitledFile",
    "eslint.autoFixOnSave": true,
    "eslint.validate": ["javascript", "javascriptreact", "vue"],
    "vsicons.projectDetection.autoReload": true,
    "vsicons.dontShowNewVersionMessage": true,
    "tslint.autoFixOnSave": true,
    "debugwrapper.wrappers": {
      "default": "console.log('$eSEL', $SEL)"
    },
    "prettier.tslintIntegration": true,
    "cSpell.userWords": [
      "Unmount"
    ],
    "jest.autoEnable": false,
    "eslint.autoFixOnSave": true,
    "eslint.validate": [
      "javascript",
      "javascriptreact",
      {
        "language": "html",
        "autoFix": true
      },
      {
        "language": "vue",
        "autoFix": true
      }
    ]
  }

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值