zoukankan      html  css  js  c++  java
  • VSCode Eslint+Prettier配置

    打开VSCode设置

    {
        "editor.fontLigatures": true,
        "editor.fontFamily": "Fira Code Light , Consolas, 'Courier New', monospace",
        "editor.maxTokenizationLineLength": 2000000,
        // 保存时自动格式化代码
        "editor.formatOnSave": true,
        // eslint配置项,保存时自动修复错误
        "editor.codeActionsOnSave": {
            "source.fixAll": true
        },
        // 终端
        "terminal.integrated.profiles.windows": {
            "cmder": {
                "path": "C:\\WINDOWS\\System32\\cmd.exe"
            }
        },
        "terminal.integrated.defaultProfile.windows": "cmder",
        // json 最大编译值
        "json.maxItemsComputed": 500000,
        // 文件后缀支持
        "files.associations": {
            "*.tpl": "html"
        },
        "security.workspace.trust.emptyWindow": false,
        "security.workspace.trust.enabled": false,
        "editor.wordWrap": "on",
        /** 格式化 */
        "[json]": {
            "editor.defaultFormatter": "vscode.json-language-features"
        },
        "[typescriptreact]": {
            "editor.defaultFormatter": "esbenp.prettier-vscode"
        },
        "[typescript]": {
            "editor.defaultFormatter": "esbenp.prettier-vscode"
        },
        /************** ESlint *****************/
        // "eslint.enable": true,
        "eslint.format.enable": true,
        "eslint.run": "onType",
        "eslint.nodePath": "",
        "eslint.options": {
            "extensions": [
                ".js",
                ".vue",
                ".ts",
                ".tsx"
            ]
        },
        "eslint.validate": [
            "javascript",
            "javascriptreact",
            "html",
            "vue"
        ],
        "eslint.codeAction.showDocumentation": {
            "enable": true
        },
        /************** Prettier *****************/
        // "editor.defaultFormatter": "esbenp.prettier-vscode",
        // #去掉代码结尾的分号
        // "prettier.semi": true,
        // #使用单引号替代双引号
        // "prettier.singleQuote": true,
        // "editor.fontWeight": null,
        // "explorer.confirmDelete": false,
        // "[html]": {
        //     "editor.defaultFormatter": "esbenp.prettier-vscode"
        // },
        // "less.compile": {
        //     "out": "${workspaceRoot}/"
        // },
        // // "[typescriptreact]": {
        // //     "editor.defaultFormatter": "esbenp.prettier-vscode"
        // // },
        // "[typescript]": {
        //     "editor.defaultFormatter": "esbenp.prettier-vscode"
        // },
        // "[javascript]": {
        //     "editor.defaultFormatter": "esbenp.prettier-vscode"
        // },
        // "js/ts.implicitProjectConfig.experimentalDecorators": true,
        // "[typescriptreact]": {
        //     "editor.defaultFormatter": "esbenp.prettier-vscode"
        // },
    }
    
    
  • 相关阅读:
    软件测试跟踪工具Bugzilla的安装
    Linux必备命令
    BPM Activiti5 学习资料
    23种Java设计模式-传智播客课程
    linux svn 启动 关闭
    JQuery调用iframe子页面函数/对象的方法
    判断 iframe 是否加载完成的完美方法
    java获得数据库信息常用API(DatabaseMetaData)示例
    JS动态修改页面EasyUI datebox不生效、EasyUI动态添加Class、EasyUI动态渲染解析解决方案
    旧金山大学的算法可视化学习教程 赞的教程,将抽象的算法可视化,易于理解
  • 原文地址:https://www.cnblogs.com/KevinTseng/p/15765484.html
Copyright © 2011-2022 走看看