prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.41k stars 254 forks source link

semi error in Vue Template #66

Closed zlxbuzz closed 5 years ago

zlxbuzz commented 5 years ago

eslint-config-prettier 3.3.0

I use vim-prettier will generate semi automatically , but cause error ,how do I configure it?

Input:

<com @click="$emit('click');"></comp>

Output:

error  Delete `;`  prettier/prettier

Expected behavior:

No error;

lydell commented 5 years ago

How am I supposed to reproduce this? I don’t have enough information to help you.

zlxbuzz commented 5 years ago

@lydell Thanks for respond to my question, i just want to disallows this rule(semi) in vue.template , not in *.js or vue.script.Is there any way?

My config

 module.exports = {
    env: {
      browser: true,
      es6: true,
      commonjs: true
    },
    parserOptions: {
      sourceType: "module"
    },
    extends: [ "plugin:vue/base","plugin:prettier/recommended"]
  };
lydell commented 5 years ago

Are you looking for ESLint overrides?

zlxbuzz commented 5 years ago

@lydell I have a little thought, thank you for your reply.