Brackets: JSLint not working: 'alert' was used before it was defined. alert(date);

Created on 23 Aug 2016  路  3Comments  路  Source: adobe/brackets

The JSLint thinks that when I use the alert("Your Text Here"); script, I am using a function. Please fix ASAP
All I did was put an alert(); script in the javascript file and I got an error.
I expected it to run an alert.
I get the error in JSLint: "'alert' was used before it was defined. alert(date);"
Brackets version: Latest
OS version: Windows 7 Premium
I've tested without extensions
No Console errors.
HELP

F Code Inspection (Linting)

Most helpful comment

You can put the following comment at the top of your file

/*jslint devel: true */

for further refs: http://www.jslint.com/help.html

All 3 comments

You can put the following comment at the top of your file

/*jslint devel: true */

for further refs: http://www.jslint.com/help.html

As @vvks pointed out, devel: true is the way to go

Assume in development

devel

true if browser globals that are useful in development should be predefined, and if debugger > statements and TODO comments should be allowed. It adds the same globals as this directive:

/*global
alert, confirm, console, Debug, opera, prompt, WSH
*/

Be sure to turn this option off before going into production.

Closing as answered.

problem fixed here : https://youtu.be/khmBtMlST9Q

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrapino picture mrapino  路  3Comments

Hi,
KSSS10 picture KSSS10  路  3Comments

naphipps picture naphipps  路  4Comments

zaggino picture zaggino  路  4Comments

ankushdas9 picture ankushdas9  路  3Comments