react-native-macos/packages/eslint-plugin-specs
MaeIg dc4d73c954 Extract the buildSchema function in the parsers-commons.js (#35158)
Summary:
This PR aims to extract  the buildSchema function into parsers-commons that is shared between typescript and flow. It is a task of https://github.com/facebook/react-native/issues/34872:
> Extract the buildSchema function ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/index.js#L66), [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/index.js#L72)) in the parsers-commons.js file to a top level buildSchema function which takes additional parameters to properly parse the content, get the config type and to build the schema, based on the language used.

## 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 buildSchema function in the parsers-commons.js

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

Test Plan:
yarn test:
<img width="380" alt="image" src="https://user-images.githubusercontent.com/40902940/209584411-40f66047-e25d-43d4-975d-af10cd202f24.png">

yarn flow:
<img width="150" alt="image" src="https://user-images.githubusercontent.com/40902940/209584423-4cf2cb5a-a300-40a6-962c-e57934f19ad2.png">

yarn lint:
<img width="510" alt="image" src="https://user-images.githubusercontent.com/40902940/209584440-2d2b2658-73d8-47e2-bb8c-64d4633369a2.png">

Reviewed By: cortinico

Differential Revision: D42386804

Pulled By: cipolleschi

fbshipit-source-id: 2a238f7cec982d8ef3fd57a34dc9f58171e32b53
2023-01-12 04:23:42 -08: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 Rename eslint-plugin-codegen to eslint-plugin-specs (#32698) 2021-12-02 20:47:12 -08:00
index.js '@emails' -> '@oncall' (*.js) 2022-09-21 20:47:05 -07:00
package.json Bump further patch packages to unblock nightly as they have unreleased changes on main 2022-12-10 04:03:11 -08: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 buildSchema function in the parsers-commons.js (#35158) 2023-01-12 04:23:42 -08:00