DEV Community

Discussion on: Migrating and configuring Eslint with Angular 11

Collapse
 
gsarciotto profile image
Giovanni Sarciotto

Hi Ben, thanks for the compliments!

Hmm, thats odd, try running the ng lint command. If it works then there is some setting in the extension that you need to see (probably the lint on save one). If it doesn't then reply and I will be glad to help

Collapse
 
ben_howl profile image
Ben

Hi Giovanni, thank you for your quick reply !
When I run ng lint, I do have errors and warnings, and unused vars belong to the warning category - that might be the reason why it doesn't get red when I write an unused var. That's weird anyway, because I just followed your tuto.

Thread Thread
 
gsarciotto profile image
Giovanni Sarciotto

Yeah, in the config above unused vars is a warning. You can make it an error in the rules section, see this. I don't think you will need to disable the core ESLint rule since @typescript-eslint/recommended already does this, so just add the "@typescript-eslint/no-unused-vars": ["error"] line