vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Maybe some conflict whthin vetur format and eslint(recommit,add some picture and setting) #994

Closed L-Devil-GitHub closed 5 years ago

L-Devil-GitHub commented 5 years ago

Info

Problem

maybe some conflict between vetur format and eslint. l can only provide some picture and my vscode setting. if its my mistake of eslint config.please tell. the rate of the problem happen is very low, may exist before the last update

Reproducible Case

thats the vscode formatted and eslint error image

image

and the follow picture is the format which may eslint want

image

and follow is my setting

{
    "editor.renderWhitespace": "all",
    "editor.detectIndentation": false,
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "html.format.endWithNewline": true,
    "html.format.indentInnerHtml": true,
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true,
    "window.zoomLevel": 0,
    "team.showWelcomeMessage": false,
    "workbench.activityBar.visible": true,
    "workbench.statusBar.visible": true,
    "workbench.editor.showTabs": true,
    "window.menuBarVisibility": "default",
    "git.autofetch": true,
    "prettier.semi": true,
    "prettier.singleQuote": true,
    "prettier.trailingComma": "all",
    "prettier.tabWidth": 4,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "vue"
    ],
    "gitlens.keymap": "alternate",
    "gitlens.gitExplorer.files.layout": "tree",
    "gitlens.advanced.messages": {
        "suppressCommitHasNoPreviousCommitWarning": false,
        "suppressCommitNotFoundWarning": false,
        "suppressFileNotUnderSourceControlWarning": false,
        "suppressGitVersionWarning": false,
        "suppressLineUncommittedWarning": false,
        "suppressNoRepositoryWarning": false,
        "suppressResultsExplorerNotice": false,
        "suppressShowKeyBindingsNotice": true
    },
    "gitlens.historyExplorer.enabled": true,
    "typescript.updateImportsOnFileMove.enabled": "always",
    "vetur.format.defaultFormatter.html": "prettyhtml",
    "vetur.format.options.tabSize": 4,
    "vetur.format.defaultFormatterOptions": {
        "prettyhtml": {
            "wrapAttributes": true,
            "sortAttributes": true,
        },
        "prettier": {
            "semi": true,
            "singleQuote": true,
            "trailingComma": "all",
            "tabWidth": 4,
        }
    }
}

and my .prettierrc

{
    "semi": true,
    "singleQuote": true,
    "trailingComma": "all",
    "tabWidth": 4
}
patrickcate commented 5 years ago

If it's the same issue, I've ran into this today as well. I haven't noticed it with Githubissues.

  • Githubissues is a development platform for aggregating issues.