neoclide / coc-eslint

Eslint extension for coc.nvim
MIT License
396 stars 25 forks source link

Coc-eslint doesn't work on my typescript files #113

Closed xavierhazzardadmin closed 3 years ago

xavierhazzardadmin commented 3 years ago

I'm not that experienced with Vim, I only just started using it.

I had coc-eslint working completely fine in my JavaScript files, it gave me errors as soon as I saved. But now as I'm learning typescript and I'm trying to use vim with typescript, it doesn't work.

I don't get any indication of errors in my files and nothing in the diagnostics.

As soon as I switch to the JS, in the same directory, it works.

Please let me know what you need to reproduce this issue.

Much appreciated.

chemzqm commented 3 years ago

Read configuration

xavierhazzardadmin commented 3 years ago

Read configuration

Would you be able to tell me specifically which parts I should be looking at? I tried to use the eslint.probes method but I've still no success.

When I try to run :CocCommand eslint.lintProject I get either TSC error or [coc.nvim] TSC error: ESLint: 7.20.0

I don't really know how to fix this issue and I'm not too keen on switching back to VSCode after all the effort I've gone into making Vim nicer for myself.

chemzqm commented 3 years ago

All configurations are the same as VSCode.

Add your filetype to eslint.validate configuration, you also have to configure your eslint to support typescript.

Use "eslint.lintTask.options": [".", "--ext", ".ts"] configuration for eslint.lintProject command

xavierhazzardadmin commented 3 years ago

All configurations are the same as VSCode.

Add your filetype to eslint.validate configuration, you also have to configure your eslint to support typescript.

Use "eslint.lintTask.options": [".", "--ext", ".ts"] configuration for eslint.lintProject command

I am so thankful to you. This worked straight away. Thanks so much