search

Home  >  Q&A  >  body text

Eslint and Vue gives function defined but never used no-unused-vars

Is there any way to fix this error in vue js (vue3) Before this error I had an error about prettier

I get this error when I run "npm runserve" I use "npm run lint -- --fix" but nothing changes

LoginPage.vue

eslintrc.js

P粉511985082P粉511985082338 days ago527

reply all(1)I'll reply

  • P粉041758700

    P粉0417587002023-12-26 18:27:20

    It literally tells you what the problem is

    Don't remove unused var checks in eslint, that's just laziness.

    It found two problems with your code:

    1. You are using the composition API but have not included the settings in a script tag. Your script opening tag should look something like