- 
                Notifications
    You must be signed in to change notification settings 
- Fork 14
The string 'use strict' on its own line shouldn't cause a warning #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Nice. In general, I believe we haven't made changes to the javascriptlint in this repo except for the build system. I had assumed the original project was abandoned, but I see that there have been another 50 subversion commits since this fork. It may be worth trying to sync up with upstream again. Notably, they ripped out Spidermonkey in favor of a pure-JavaScript parser. (See https://sourceforge.net/p/javascriptlint/code/commit_browser; we branched at revision 302.) | 
| Ah, cool. I'll take a look into what needs to be done to sync with that repo at some point, and see if I can get this change (or a similar one) accepted upstream. | 
| Cool. Definitely not saying we can't land this in the meantime, though if we don't get it upstreamed and we do sync up, we'll probably lose it. | 
bd11243    to
    08162f2      
    Compare
  
    | @davepacheco I've synced up the repo with the latest changes to the subversion repo, as well as two other changes I made: one to not consider placing functions in an array "unusual", and the other to support the "use strict" string. | 
…entioned in comment regarding invalid control comments
…confirm this works.
…input file encoding on the command line.
…ONTINUE as an exit point
… attached patched.
| Thanks for doing this. Sorry it's taken me a while to look closely at it. I tried to clone it but ran into this: There are a few problems here: 
 I think @melloc is already working on this. I'm just updating the ticket to reflect the status. Once this is resolved, I'll be interested to 
 | 
| Thanks for fixing the issue above. On the joyent/manta-marlin repo, where we run it over 54 files, I found two things of note: 
 setTimeout(function doSomething() {
        console.log('it works!');
        setTimeout(doSomething, 1000);
}, 1000);It reports "doSomething" as an undeclared identifier on line 3. | 
| Another issue with the new version: the  | 
| I've added support for the  I profiled the code with cProfile, and it looks like the majority of the program's time is being spent in the tokenizing code. It's unclear to me how it could be improved without further investigation, but it seems like that is something that can also be investigated in the future. | 
The string
'use strict'on its own line causes part of the program to enter into strict mode, and changes the semantics of some operations (usually making more things throw errors instead of silently failing). This change prevents warning when it's used in a program.