I am working on react application with typescript. I have created react application using : npx create-react-app test-app --template typescript
eslint is already configured here when we create app using create-react-app in react-scripts
But when I do npm start, eslint error not coming
In App.tsx, I added one console.log("test") for testing. And then in eslintConfig in package.json, added below :
rules : { "non-console" :"error" }
Now, when I start react application, not getting error message in console that console.log is used. But, when I save App.tsx, error message comes for console.
How can I get eslint this console error on starting react application itself.
Add
"lint:fix": "tslint --fix --project .", in scripts (package.json)Create tslint.json
install tslint dependencies (i use this versions)