dillon1000/react

Commit

[babel] Don't use source location for hoisting check

Instead of using the source location to check for hoisting, just stop checking 
for a given component after we reach it's declaration. 

By definition all references to it before are (potential) hoisting errors. 

Note that there could be false positives but that's ok.
Browse files
Changed paths4 files
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts ModifiedD compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component-syntax-ref-gating.flow.expect.md DeletedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.component-syntax-ref-gating.flow.expect.md AddedR compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/component-syntax-ref-gating.flow.js →compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.component-syntax-ref-gating.flow.js Renamed
Patch

Files changed

Rendering syntax-highlighted changes…