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

Eslint validates node_modules, throws errors #1695

Closed
Tobjoern opened this issue Mar 30, 2020 · 12 comments
Closed

Eslint validates node_modules, throws errors #1695

Tobjoern opened this issue Mar 30, 2020 · 12 comments
Labels

Comments

@Tobjoern
Copy link

I have some trouble using the '@minogin/vue-drag-resize-rotate' with the template.
After installing it, eslint throws various errors (and checks the module for errors), claiming the module is not installed, which is not the case. I am not an eslint expert, it could very well be that there is a bug with eslint, but I don't know.

I used the latest versions of all modules.

Reproduction:
https://github.com/Tobjoern/wemake-import-issue

Thanks for your help.

@Tobjoern Tobjoern changed the title Eslint validates node_modules, throw errors Eslint validates node_modules, throws errors Mar 30, 2020
@sobolevn
Copy link
Member

Hm, that is strange. What happens if you try to remove @minogin/vue-drag-resize-rotate?

@sobolevn sobolevn added the bug label Mar 30, 2020
@Tobjoern
Copy link
Author

It works fine then, but I have noticed similar issues with other packages. I will send further information shortly.

@Tobjoern
Copy link
Author

I have a similiar issue with the 'vue-credit-card-field' package. I added a reproduction under the 'test2' page.

@sobolevn
Copy link
Member

Can you please try to disable all these lines one by one and tell which one causes this fail? https://github.com/wemake-services/wemake-vue-template/blob/master/template/.eslintrc.js#L7-L16

@Tobjoern
Copy link
Author

Even after commenting out all these lines, the error still persists.

I also commented out https://github.com/wemake-services/wemake-vue-template/blob/master/template/nuxt.config.ts#L123-L128, as an attempt to completely dissable eslint. This explains how eslint is supposed to be implemented in nuxt.js. However, even after commenting this implementation out, eslint is still active. From my current understanding this means some third party (plugin) runs eslint. But this third party doesn't seem to be properly setup, as th .eslintingore file is (ironically) ignored.

@sobolevn
Copy link
Member

sobolevn commented Apr 1, 2020

@Tobjoern I have copied your repo and tried to reproduce:

~/Desktop/wemake-import-issue  master ✔                                              
» npm run lint:js

> [email protected] lint:js /Users/sobolev/Desktop/wemake-import-issue
> eslint --cache --ext .js,.ts,.vue,.json --ignore-path .gitignore .

I don't have any issues.

@Tobjoern
Copy link
Author

Tobjoern commented Apr 1, 2020

I'm sorry, I didn't explain properly.
I re-added wemake-services' default eslint configuration, and now npm run lint:js works fine.
However npm run dev throws a bunch of errors, even though eslint (and stylelint) are completely disabled the way it is described in the nuxt.js documentation.

@sobolevn
Copy link
Member

sobolevn commented Apr 1, 2020

Oh, I see. Here's the issue you are talking about:
Снимок экрана 2020-04-01 в 12 28 46

@sobolevn
Copy link
Member

sobolevn commented Apr 1, 2020

It looks like that this is not eslint. But it is typescript error.

@Tobjoern
Copy link
Author

Tobjoern commented Apr 1, 2020

Hm okay, and how can one resolve this issue?

@sobolevn
Copy link
Member

sobolevn commented Apr 1, 2020

There are two ways AFAIK:

  1. The wrong one: --skipLibCheck from https://www.typescriptlang.org/docs/handbook/compiler-options.html
  2. The correct one: sending a PR with the fix to @minogin/vue-drag-resize-rotate

Feel free to post your solution!

@Tobjoern
Copy link
Author

Tobjoern commented Apr 6, 2020

Thanks for the solution, I thought it was eslint!
I decided to go with the 'skipLibCheck' option.
In tsconfig.json: compilerOptions.skipLibCheck: true

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

No branches or pull requests

2 participants