I am facing an issue which is similar to this one and since I don't have enough reputations I wasn't able to comment and this question was asked almost a year ago. And since CRA have frequent updates and its been a year I might have missed if the issues have been resolved and the mentioned question didn't have any solution in it. So here's the problem Im facing:
Instead of adding eslint-disable comments to every other file, I have turned off the no-sparse-array rule in my .eslintrc, my vscode seems to follow my customizable eslint configuration and doesn't show lightbulb or error over the respected lines of code
.eslinrc
"rules": {
"no-sparse-arrays": "off",
....
....
},
I am calling a method in which instead of passing undefined for more than two times for skipping parameters I used sparse array so that the method and its parameters are readable
post(SERVICE_URLS.forgotPassword(), payload, ...[,,,], false)
Here, Im setting three of the parameters as undefined, With customized eslint configuration I dont see errors / warnings over this line. But in the browser console and in the terminal running the npm run start, I can still see the error
Line 15: Unexpected comma in middle of array no-sparse-arrays
In my understanding, as the react app is bootstrapped with CRA, CRA is not following the customized configuration and as a result I can still see the warning. OR I might be missing something. Is there a workaround for this or Do I have to go for react-app-rewired
or react-app-rewire-eslint
to solve this problem?