Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 2551 depending on indent (and it shouldn't even occur here) #1809

Closed
3 tasks done
schl3ck opened this issue Mar 27, 2020 · 3 comments
Closed
3 tasks done

error 2551 depending on indent (and it shouldn't even occur here) #1809

schl3ck opened this issue Mar 27, 2020 · 3 comments

Comments

@schl3ck
Copy link

schl3ck commented Mar 27, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows 10 Enterprise ((1803) 64-bit
  • Vetur version: 0.24.0
  • VS Code version: 1.43.2

Problem

Vetur reports the error 2551 at a position where no error is. Also this depends on the indentation of the line. The error says

Property 'houldError' does not exist on type 'CombinedVueInstance<{ tasks: any[]; } & { shouldError(task: any): void; errorsToo(id: any): void; noError(): void; } & Record<never, any> & Vue, object, object, object, Record<never, any>>'. Did you mean 'shouldError'? Vetur(2551)

vetur-error-2551
vetur-error-2551-2

Reproducible Case

I've created a repo that reproduces this error: https://github.com/schl3ck/vetur-error-on-different-indent

The steps are outlined in the readme of the linked repo, but are the same as these:

  1. Clone the repo
  2. Run npm i
  3. Open the folder with VSCode and open the file src/Errors.vue
  4. Wait until everything is loaded
  5. Observe the error Veture(2551) on line 8 & 9 but not on line 10
  6. Indent line 8 or 9 once => error still there
  7. Indent same line again => error vanishes
  8. Remove (...) from the function call on the other line => error vanishes
  9. Add () to the function call on line 10 => error appears
@DarkLite1
Copy link

I have the exact same issue:

image

@dastrong
Copy link

dastrong commented Jun 2, 2020

having the same issue with inline functions. Happens across multiple computers

@octref
Copy link
Member

octref commented Jun 8, 2020

#1319

Please change line ending to LF to see if it goes away.
Upstream PR is vuejs/vue-eslint-parser#74

@octref octref closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants