Repository navigation
Conversation
- lib/webrtc.js: open() referenced an undeclared 'gun' for peer.$ and the 'rtc' event, so creating a peer throws ReferenceError unless the app happens to define a global 'gun'. Use root.$, like the rest of the file. - lib/time.js: 'opt' was assigned without a declaration (implicit global). - lib/normalize.js: a ';' instead of ',' ended the var list in moveSpace(), turning sAdd/pAdd (and n2) into implicit globals; t2 in next() was undeclared as well.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More
no-undeffindings inlib/(follow-up to #1434):lib/webrtc.js:open()doespeer.$ = gunandgun.on('rtc', eve), but there is nogunin scope (the module only hasrootfromGUN.on('opt', function(root){…})). Unless the app happens to define a globalgun, creating a WebRTC peer throwsReferenceError: gun is not defined. Changed both toroot.$, which is what the rest of the file uses (root.$.get('/RTC/…')).lib/time.js:optis assigned without being declared, leaking an implicit global; added it to the existingvarlist.lib/normalize.js: inmoveSpace()thevarlist ends with;afters = …, sosAddandpAdd(andn2) become implicit globals shared across recursive calls;t2innext()was also undeclared. Changed;to,and declared the missing names.All three files still parse, and eslint
no-undefno longer reports these names.