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"
       ],
    }
  • 相关阅读:
    加载与隐藏显示
    Task 自我总结认知
    修复SDF数据库引擎C#代码
    Windows防火墙开启后 ping不通了 的解决方案
    C# 串口
    WPF DataGrid中单元格运用Combobox的示例
    组合模式
    适配器模式
    【转载】.net 动态代理
    python数组操作
  • 原文地址:https://www.cnblogs.com/CaktyRiven/p/11187772.html
Copyright © 2011-2022 走看看