vscode prettier 不按eslint 配置进行整理

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 求解

阅读 2.7k
1 个回答

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"
  }
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题