This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251879 - Generate JsHint global directive does not work for inline scripts
Summary: Generate JsHint global directive does not work for inline scripts
Status: RESOLVED DUPLICATE of bug 250496
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-16 06:26 UTC by gameshas
Modified: 2015-04-16 20:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example.html (383 bytes, text/plain)
2015-04-16 06:26 UTC, gameshas
Details
result.html (405 bytes, text/plain)
2015-04-16 06:26 UTC, gameshas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gameshas 2015-04-16 06:26:03 UTC
Created attachment 153226 [details]
example.html

Attached the example html file and resulting html file.

Nebeans display a hint to add JsHint global for global javascript objects, it works fine in javascript files, but in html file where inline javascript is used it displays the same suggestions to add global jshint, but instead of adding it to the top of the inline <script /> tag it add's it to the top of the document inside html.

Either the jshint should not be suggested for inline script's, or it should add jshint inside the inline script tag.

How to reproduce:
inside example.html press on the hint "Generate jsHint global directive" next to the App.loader.show().
/* global App */ is added between <html> and <head> tags, see result.html
Comment 1 gameshas 2015-04-16 06:26:29 UTC
Created attachment 153227 [details]
result.html
Comment 2 Petr Pisl 2015-04-16 20:30:54 UTC
Already fixed in the trunk build. The Global variable hint is displayed only for .js files.

*** This bug has been marked as a duplicate of bug 250496 ***