unplugin / unplugin-vue2-script-setup

💡 Bring `<script setup>` to Vue 2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint error

normanfan opened this issue · comments

when i write like this

<script setup lang="ts"></script>

and the eslint will put this error

  5:22  error  Delete `;`  prettier/prettier
  6:26  error  Delete `;`  prettier/prettier

the rules in .eslinttrc.js is

   'prettier/prettier': [
      'error',
      {
        arrowParens: 'avoid',
        printWidth: 80,
        singleQuote: true,
        semi: false,
        trailingComma: 'none',
      }
    ],

How can i do to fix it, thanks

It doesn't seem to be related to this project. You might need to figure it out yourself.

I'm having this error as well, as we are not using semi commas on our project, and I'm thinking maybe the code delivered to the linter/builder is the one after the transformation, and the transformation is updating the code formatting. I ended up removing the prettier rules of ESLint, but this seems like a workaround.

@antfu reviewing the code this package produce, I think the issue, as I said, is that it first transforms the code, and then the code is sent to the linter. Do you think it is possible to transform the code after it has been linted or this is a limitation on how the Vue CLI works?