react-native-macos/packages/eslint-plugin-specs
MaeIg 38fcafe623 Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file (#34934)
Summary:
This PR aims to reduce code duplication by extracting `createParserErrorCapturer` function from the flow and typescript folders into a shared parsers/utils.js file. It is a task of https://github.com/facebook/react-native/issues/34872:
> Extract the function createParserErrorCapturer ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/utils.js#L122-L143) [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/utils.js#L114-L135)) into a single function in the parsers/utils.js file and replace its invocation with this new function.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file

Pull Request resolved: https://github.com/facebook/react-native/pull/34934

Test Plan:
yarn flow:
<img width="628" alt="image" src="https://user-images.githubusercontent.com/40902940/194948886-d6763e39-ea07-4004-86cc-5287c4783012.png">

yarn lint:
<img width="509" alt="image" src="https://user-images.githubusercontent.com/40902940/194948916-3e54afa5-7e0b-4a61-ac18-8ec306d8c6d4.png">

yarn jest react-native-codegen:
<img width="386" alt="image" src="https://user-images.githubusercontent.com/40902940/194948966-d1e5b12e-02ab-4d53-a4bf-6abaf4d70fbe.png">

Reviewed By: cipolleschi

Differential Revision: D40256048

Pulled By: cipolleschi

fbshipit-source-id: 098519a17d6e3128d236c639b246a706f9dbf66d
2022-10-11 05:24:25 -07:00
..
__tests__ '@emails' -> '@oncall' (*.js) 2022-09-21 20:47:05 -07:00
with-babel-register '@emails' -> '@oncall' (*.js) 2022-09-21 20:47:05 -07:00
BUCK
index.js '@emails' -> '@oncall' (*.js) 2022-09-21 20:47:05 -07:00
package.json Update flow-parser for react-native-codegen and eslint-plugin-spec 2022-08-18 11:32:01 -07:00
postpack.js Add postpack hook that undoes prepack 2022-07-29 03:56:23 -07:00
prepack.js fix npm lifecycle hook (#34273) 2022-07-26 06:47:51 -07:00
react-native-modules.js Extract the function createParserErrorCapturer into a single function in the parsers/utils.js file (#34934) 2022-10-11 05:24:25 -07:00