DEV Community

Discussion on: Using ESLint and Prettier with VScode in an Angular Project 🚀(outdated)

Collapse
 
cptdaydreamer profile image
CptDayDreamer • Edited

How to configure specific rules? If I add "no-empty-function": "off" to .eslintrc.json it won't be recognized. I still get the warning in my code. Where to set it then or why does it not work? Nice tutorial anyway but that's a problem for me. The warning in the code is: Unexpected empty method 'ngOnInit'.eslint@typescript-eslint/no-empty-function

Collapse
 
jpchip profile image
Jared Chapiewsky

I had the same problem! To resolve, I actually had to add "@typescript-eslint/no-empty-function": "off" to the .eslintrc.json file. The "@typescript-eslint/" was the important missing bit. You probably figured this out ages ago but wanted to add it here in case anyone else has this same problem.

Collapse
 
lahinouski profile image
Aliaksandr Lahinouski

Thank you Jared! Thank you so so much. Love you man.