zoukankan      html  css  js  c++  java
  • vscode 配置 eslint 自动格式化

    1、安装插件 eslint

    2、文件=》首选项=》设置 setting.json

    "eslint.autoFixOnSave": true,
    "eslint.options": {
        "extensions": [
            ".js",
            ".vue"
        ]
    },
    "eslint.validate": [
        "javascript",{
            "language": "vue",
            "autoFix": true
        },"html",
        "vue"
    ],

    vue eslint 和vscode 配置eslint 自动保存 缩进冲突

    项目根目录 新建文件 .editorconfig

    配置

    # See http://EditorConfig.org
    
    root = true
    
    [*]
    indent_style = space
    indent_size = 4
    end_of_line = crlf
    charset = utf-8
    trim_trailing_whitespace = true
    insert_final_newline = true

    vscode 配置(all)

    {
      "window.zoomLevel": 0,
      // 编辑器字体加粗   
      "editor.fontWeight": "400",
      // 字体风格
      "editor.fontFamily": "'Menlo','Monaco','Courier New','monospace'",
      // 主题
      "workbench.colorTheme": "Atom One Dark",
      // 导航栏在左   
      "workbench.sideBar.location": "left",
      // 字体大小
      "editor.fontSize": 15,
      "git.ignoreLegacyWarning": true,
      "editor.detectIndentation": false,
      "editor.tabSize": 4,
      "vetur.format.defaultFormatter.html": "js-beautify-html",
      "eslint.alwaysShowStatus": true,
      "eslint.autoFixOnSave": true,
      "eslint.options": {
            "extensions": [
                ".js",
                ".vue"
            ]
       },
       "eslint.validate": [
            "javascript",{
                "language": "vue",
                "autoFix": true
            },"html",
            "vue"
       ],
    }
  • 相关阅读:
    [2010山东ACM省赛] Balloons(搜索)
    [2010山东ACM省赛] Greatest Number(数的组合+二分搜索)
    [ACM] hdu 1213 How Many Tables(并查集)
    C Shuffle Cards
    快速读入输出模板
    J Distance to Work
    E Sort String
    H Diff-prime Pairs
    A PACM Team
    区间 (interval)
  • 原文地址:https://www.cnblogs.com/CaktyRiven/p/11187772.html
Copyright © 2011-2022 走看看