[RN72] Fix lint-staged
Summary:
This finally resolves ENG-1011. It's necessary because ESLint 8 has removed the CLIEngine class.
I got this logic from the lint-staged README.md file.
Depends on D10543
Test Plan:
- Edit a file that is in .eslintignore but not .gitignore. I opted for some file in native/flow-typed
- Add a line that isn't formatted in a way that Prettier likes
- Confirm that lint-staged doesn't fix the file on commit
- Remove native/flow-typed from .eslintignore and try again. Confirm that this time, lint-staged fixes the file on commit
Reviewers: atul
Reviewed By: atul
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D10544