mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
3c46984e09b5e0343ec7e9a99a4557a2f15ef2a2
Adds the two FBT (https://facebook.github.io/fbt/) plugins to our test setup so that we can verify Forget plays well with FBT. Unfortunately FBT's plugins are a bit finicky, and things that are technically allowed per the JSX spec (such as wrapping string attribute values in a JsxExpressionContainer) aren't supported by FBT's plugin. This PR is just to add the fbt plugins and highlight some cases that fail; these are fixed in later PRs in the stack. For example, the `fbt-params.js` fixture fails on this PR: Input ```error.fbt-params.js import fbt from "fbt"; function Component(props) { return ( <fbt desc={"Dialog to show to user"}> Hello <fbt:param name="user name">{props.name}</fbt:param> </fbt> ); } ``` Output ``` React Forget › __tests__/fixtures/compiler › fixtures › fbt-params Expected fixture 'fbt-params' to succeed but it failed with error: /Users/joesavona/github/react-forget/forget/fbt-params: fbt: unsupported babel node: MemberExpression --- props.name --- ``` See fixes later in the stack.
Languages
JavaScript
48.8%
Rust
26.4%
TypeScript
22.7%
HTML
1%
CSS
0.8%
Other
0.3%