I'm using the Angular 12 version in my project.
I've used setTimeout function as below:
setTimeout(() => this.document.location.reload(), 2000);
When I run npm run eslintandfix
then I get an error like this
error You should use the $timeout service instead of the default window.setTimeout method angular/timeout-service
I've updated eslint scripts in my package.json as below:
"elint": "eslint . --ext .ts",
"elintandfix": "eslint . --ext .ts --fix",
This is the state of my package.json EsLint plugins:
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-angular": "^4.0.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^5.2.1",
I couldn't find any solution for this. Kindly help me out.
Thank you in advance.