Hi there,
A super noob here – sorry.
I sent the following email to JQuery with the associated response.
Am I asking the right question?
Hi There,
Super noob here.
I am trying to run jQuery JavaScript Library v1.11.3 in Brackets on OS X.
When I open the file in Brackets to sight the code there is a litany of errors thrown.
eg: 'module' was used before defined
Combine this with the previous statement
Expected 'jQuery' at column 9, not column 5
There are more than 50 errors. Brackets stops looking after 50.
I must be doing something very wrong here???
screen grab available here:
http://www.leapfrog.net.au/client/lincoln/Screen%20Shot%202015-08-17%20at%202.39.21%20am.png
Any guidance would be greatly appreciated.
Trev
Re: errors thrown in Brackets
14 minutes ago
Don’t use jslint against jQuery source. You could contact the brackets people to find the setting to stop linting jQuery.
JΛ̊KE
@10polarbears As you might be aware- JSLint is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules. You may want to address them for better compliance with JavaScript coding standards.
However, if you are sure that your code doesn't contain other errors and you don't want to be bothered by linting errors, you can disable JSLint by:-
Debug > Open Preferences File."linting.enabled": false, . In case you add this preference as the last line, make sure you don't add the comma at the last.Firstly thank so very much for you explanation and help.
That certainly did the trick once I added the recommend line.
It does raise one question though.
What to do about JSON.
Because of your answer I am now starting to look in the right places for answers.
Here I find the remanded prefs for JSON which have linting on and collapsed off.
Default Preferences (JSON)
{
"useTabChar": false,
"tabSize": 8,
"spaceUnits": 4,
"closeBrackets": false,
"showLineNumbers": true,
"styleActiveLine": false,
"wordWrap": false,
"linting.enabled": true,
"linting.collapsed": false,
"quickview.enabled": true
}
Would it be true to say that if I am using JQuery and JSON then both "linting.collapsed" and "linting.enabled" should be set to false?
Thank you again.
I would not recommend to disable the linting feature, but better to use an alternative linter like ESLint instead of the bundled JSLint.
It should be sufficient to set linting.enabled to false to disable the linter.