Reporting of globals defined
Closed this issue · 1 comments
Other plugins I've used with other text editors will list out all of the things defined at global, whether by accident or not. This plugin doesn't seem to warn or list about accidentally defined globals. Otherwise its an amazing project!
Hey Kevin,
Thanks for trying out JSLintMate!
JSLint and JSHint support the undef
option, which lets you list accidental globals as errors. In your JSLint options file (e.g., jslint.json
), set undef: false
to find accidental globals. In your JSHint options file, set undef: true
instead. (The two projects diverged on how their options behave.)
Some useful info on these:
Once these options are set, JSLintMate will point out accidental globals, e.g., x = 1;
(no var
). The latest build of JSLint will report, "'x' was used before it was defined", and the latest build of JSHint will report, "'x' is not defined".
Cheers,
Ron