Sorry, I have not used the React linter, but perhaps someone else
might have, and would know more experience there.

2017-08-10 0:08 GMT+03:00 Lubo Astinov <asti...@gmail.com>:
> Have you ever been successfull in getting something compiled with Emscripten
> to pass the React linter? I'm wondering if I'm just doing something like not
> passing in the correct flag or something.
>
> On Wednesday, August 9, 2017 at 12:39:51 PM UTC-7, jj wrote:
>>
>> Hmm, most of these should be present in the compiled code file? Also,
>> `importScripts` is a web built-in in Web Worker's global scope:
>>
>> https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts,
>> I wonder if React's linter needs to be taught that the app is run in a
>> Web Worker. `dump` is an extern that comes from
>> https://developer.mozilla.org/en-US/docs/Web/API/Window/dump, though
>> the presence should always be tested first.
>>
>> 2017-08-09 20:41 GMT+03:00 Lubo Astinov <ast...@gmail.com>:
>> > Hi everyone,
>> >
>> > I'm new to Emscripten and I'm running into a problem which probably has
>> > a
>> > simple solution, yet I'm unable to find it.
>> >
>> > I create a basic React JS app with create-react-app. I then want to use
>> > a
>> > very simple .cpp file (just a noop at this point really, returning a
>> > constant) which I compile to JS with:
>> >
>> > emcc --bind -o matrix.js matrix.cpp
>> >
>> > If I use the resulting JS file in a regular html file, all is well. But
>> > the
>> > problem is that the React App linter finds missing definitions that
>> > break
>> > the compilation and I can't figure out how to make Emscripten define
>> > those.
>> > Here are the errors I'm getting:
>> >
>> > ./src/matrix.js Line 90: 'read' is not defined no-undef Line 117:
>> > Unexpected
>> > use of 'print' no-restricted-globals Line 118: 'printErr' is not defined
>> > no-undef Line 121: 'read' is not defined no-undef Line 128: 'readbuffer'
>> > is
>> > not defined no-undef Line 130: 'read' is not defined no-undef Line 136:
>> > 'scriptArgs' is not defined no-undef Line 143: 'quit' is not defined
>> > no-undef Line 196: 'dump' is not defined no-undef Line 203:
>> > 'importScripts'
>> > is not defined no-undef Line 281: 'tempRet0' is not defined no-undef
>> > Line
>> > 285: 'tempRet0' is not defined no-undef Line 489: 'EmterpreterAsync' is
>> > not
>> > defined no-undef Line 495: 'EmterpreterAsync' is not defined no-undef
>> > Line
>> > 587: 'tempI64' is not defined no-undef Line 587: 'tempDouble' is not
>> > defined
>> > no-undef Line 587: 'tempDouble' is not defined no-undef Line 587:
>> > 'tempDouble' is not defined no-undef Line 587: 'tempDouble' is not
>> > defined
>> > no-undef Line 587: 'tempDouble' is not defined no-undef Line 587:
>> > 'tempDouble' is not defined no-undef Line 587: 'tempI64' is not defined
>> > no-undef Line 587: 'tempI64' is not defined no-undef Line 1965:
>> > '___cxa_free_exception' is not defined no-undef Line 2767:
>> > 'FUNCTION_TABLE'
>> > is not defined no-undef
>> >
>> > Can someone point me to what I'm missing?
>> >
>> > Thanks!
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "emscripten-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to emscripten-discuss+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to