Vetur configuration to respect eslint standard

Viewed 700

I've set up a Vue.js project using vue-cli and work on it in VS Code and Vetur. ESLint is configured with the standard profile. I'd like the 'Format Document' command to produce a format which is valid for the eslint.

I've been able to solve the issue for single/double quotes and semi-columns with following .prettierrc.json:

{
  "semi": false,
  "singleQuote": true
}

Now I'm trying to fix the issue, where no space is being added before method parenthesis:

  • Definition function () becomes function()
  • Method call showLoginDialog () becomes showLoginDialog()

I've tried changing the default formatter as described here

  • Does a default prettierrc which respects eslint standard exist?
  • If not, how can the above mentioned issue with spaces be fixed?

[edit] I've pushed the branch containing the .prettierrc.json config: https://github.com/taconaut/Sppd.TeamTuner/commit/acd93ab9e06e2e77849af7a346609ba6bf5d639c. The only part (I'm aware of) which doesn't work is the above mentioned issue with spaces between function and parenthesis? AFAICT this should have been taken care of with "spaceBeforeFunctionParen": true which doesn't seem to have any effect.

0 Answers
Related