[Vuejs]-How to stop prettier from toggling vue interpolation in VS Code

0👍

✅

The issue must have been something to do with conflicting formaters. I removed the Prettier plugin and changed some Visual Studio Code settings.

VS Code Settings:

{
  ...
  "editor.formatOnSave": false,
  "javascript.format.enable": false,
  "eslint.autoFixOnSave": true
  ...
}

eslintrc.js

module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: ['plugin:vue/essential', '@vue/prettier'],
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'off' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  },
  parserOptions: {
    parser: 'babel-eslint'
  }
}

Relevant SO Post

Leave a comment