I have a utility function which adds some additional error handling for JSON.stringify. Is there some rules in eslint which can restrict global functions for example JSON.stringify with ESLint and after linting giving an error to use my own utility function? And how could I restrict it only to ts and tsx files?
I tried to use the no-restricted-globals rules, but it didnt solved the problem and then I used no-restricted syntax and it looks like it could work, but I am not sure how to use it and how to restrict to only ts and tsx