问答

vscode prettier 不按eslint 配置进行整理

作者:admin 2021-07-06 我要评论

RT 正常的 indent 可以但是比如ref 的位置 就不行了 { "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store"...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

RT 正常的 indent 可以但是比如ref 的位置 就不行了

{
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/.history": true,
        "**/ioscan-frontend": true,
        "**/node_modules": true,
        "**/pivot": true,
        "**/public": true,
        "**/dist": true,
        "**/.idea": true
    },
    "workbench.colorTheme": "Visual Studio Light",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        // For ESLint
        "source.fixAll.eslint": true,
        // For TSLint
        "source.fixAll.tslint": true,
        // For Stylelint
        "source.fixAll.stylelint": true
    },
    "prettier.useEditorConfig": false,
    "prettier.eslintIntegration": true,
    //配置 ESLint 检查的文件类型
    "eslint.validate": ["javascript", "javascriptreact", "vue", "html"],
    "eslint.options": {
        "configFile": "./`.eslintrc`.js"
    }
}

这是我的settings 求解

###

sf 解决办法

过程中出现了会整理两次的问题 最后的配置文件

{
  "workbench.colorTheme": "Visual Studio Light",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
    "source.fixAll.tslint": true,
    "source.fixAll.stylelint": true
  },
  //配置 ESLint 检查的文件类型
  "eslint.options": {
    "configFile": ".eslintrc.js"
  }
}

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • vscode prettier 不按eslint 配置进行

    vscode prettier 不按eslint 配置进行

  • Android内置的h5聊天界面,下拉的时候

    Android内置的h5聊天界面,下拉的时候

  • 小程序jscode的问题

    小程序jscode的问题

  • axios中post请求Content-Type的问题

    axios中post请求Content-Type的问题

腾讯云代理商
海外云服务器