zoukankan      html  css  js  c++  java
  • ESLint 配置(三)Vue 项目

    各个版本的 Vue cli 都有 ESLint 和 prettier 选项,在创建项目的时候勾选上会自动安装依赖,很方便。
    常用的 eslintConfig:

    "eslintConfig": {
      "env": {
        "browser": true,
        "es6": true
      },
      "extends": [
        "eslint:recommended",
        "plugin:vue/essential",
        "standard",
        "plugin:prettier/recommended"
      ],
      "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly",
        "process": true
      },
      "parserOptions": {
        "parser": "babel-eslint",
        "ecmaVersion": 11,
        "sourceType": "module"
      },
      "plugins": [
        "vue",
        "prettier"
      ],
      "rules": {
        "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
        "prettier/prettier": "error"
      }
    },
    "eslintIgnore": [
      "dist/*",
      "node_modules/*",
      "build/*",
      "config/*",
      "*.md"
    ]
    
  • 相关阅读:
    171-滑动窗口问题
    170-133. 克隆图
    169-150. 逆波兰表达式求值
    windows相对路径设置与取消小工具[提效]
    Sword 38
    Sword 33
    Sword 28
    Sword 26
    Sword 12
    Sword 07
  • 原文地址:https://www.cnblogs.com/ainsliaea/p/13048157.html
Copyright © 2011-2022 走看看