| Summary: | JavaScript editor shows an error in code for console keyword | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Anton McConville <antonm> | ||||
| Component: | Editor | Assignee: | Project Inbox <orion.editor-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipse.felipe, mamacdon | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Anton McConville
Created attachment 207739 [details]
screenshot of console.log showing an error
Also for 'alert' - eg: alert( 'hello' ); Not a bug, JSLint marks these occurrences as problems. add at beginning of the file use: /*global alert console whatever */ I like this rule JSLint follows, I just don't like having to write the same /*global*/ section everywhere. I thought we discussed letting the user provide a custom set of globals to always validate with (eg. "define require dojo") but I can't find a bug for it. Interesting. One thought is that this could be a JavaScript Editor preference - to be able to select the granularity of error that JS Lint finds ( I've just begun to dig into the preference problem-space ). Another thought is about perception. As a JavaScript developer when I saw that the JavaScript editor didn't recognize alert() or console.log(), it made me question the power behind the editor. The reality is that some of the very power behind it what is identifying those strings as errors! So it begs the question again - who are we targeting with the Editor? If we're mostly targeting web developers, then what functionality do you think they'd most appreciate in this regard? You just need to pass the correct option to jslint http://www.jslint.com/lint.html#global http://www.jslint.com/lint.html#options maybe you want browser set by default. |