Appcelerator - Turning off warnings - javascript

Does anyone know how to turn off warnings during the build process. While I like warnings, minified javascript code makes it go crazy, and it will not go past the warning stage to build the app, and often stalls. Is there a switch somewhere to turn them off?

If you are using Titanium Developer you can turn off or modify jslint by updating compiler.js
Below a link that details how to do this.
http://developer.appcelerator.com/question/27621/just-started---want-to-use-googles-closure-tools
Please note if you are using the new Titanium Studio this might not work.

Related

Turning off Eclipse 2020-06 Javascript Validation Notes

Using Eclipse's 2020-06 built in JavaScript editor, I need to disable the JavaScript informational notes on syntax and warnings as displayed with an (i) icon to the left of the line number and with markers to the right of the scroll bar. See links to the two images showing what these look like.
An example of the informational icon
An example of the markers
There are two warnings repeating numerous times:
'aVariableName' is declared but its value is never read.
This constructor function may be converted to a class declaration.
I would rather turn off these two individual messages since they do not apply to the project, but such control does not appear to exist, but they are overly spamming the editor and are interfering with other notifications and informational notes. FYI: I'm needing to follow specific coding conventions for the project and therefore the warnings don't even apply to the project and are just spam.
So I'll just settle for shutting off javascript validation, but the validation will not turn off.
I've tried to disable the project level settings for the javascript validation through the menu option Window, Preferences, Web, HTML Files, Client-side Javascript, Validator, Errors/Warnings: and unchecked both options of Strict Validation of Javascript keywords usage, and Enable JavaScript semantic validation. But making those changes accomplishes nothing since the warnings are still there even after running validation on the project, cleaning the project, and even restarting eclipse.
The specific version of Eclipse is:
Eclipse IDE for Enterprise Java Developers Version 2020-06 (4.16.0)
To try to better explain the need to install Node.js, this is the dialog requested Node.js be installed. The text of the dialog reads: "Missing node.js" "Could not find node.js. This will result in editors missing key features. Please make sure node.js is installed and that your PATH environment variable contains the location to the 'node' executable."
Eclipse's Missing Node.js dialog
Are there any other ways to shut off individual warnings/messages, or the javascript validations? Any help, or constructive suggestions would be very much appreciated. Thanks!
Sorry, the stackoverflow editor won't allow in-lining simple images.
Update: So I have not been able to figure out how to disable the informational notices that are showing up in the JavaScript editor along both the left and right margins. I would still love to find out how to do that. I'm wondering if the issues I'm seeing may have been resolved in the current release of Eclipse? I cannot put my development environments at risk if downgrading is not possible. But some hopeful and important details that I have learned is that the latest release of Eclipse "can" support java 1.8 although it says the minimal version supported is Java 11. And also the latest release is better integrated with Node.js so an external install is no longer required. At this time I cannot risk testing the latest Eclipse release due to possible lockout of the workspaces if eclipse cannot be downgraded. I will make plans to rebuild some of the workspaces on another workstation so it will not impact vital projects if something should go wrong.
I was able to disable these javascript validation notes by changing the following setting.
Eclipse -> Window -> Preferences -> General -> Editors ->Text Editors -> Annotations
find "Infos" in the "Annotation types" and click it
uncheck both the "Vertical Ruler" and "Overview Ruler"
optional - uncheck "Text as "Squiggly Line"
Click Apply and Close
Voila enjoy the less cluttered javascript files

How can I set up VS2015 to throw errors when I mess up my JavaScript?

When going through a code review, my technical lead picked up a few missing semicolons in my JavaScript when he went into debug. Visual Studio actually threw these exceptions up, and I was wondering where the option to turn that on was.
I've searched 'JavaScript Debugging in Visual Studio 20(15|13)', but it seems like there aren't any simple settings to enable.
Wondering the most efficient way to turn on JavaScript debugging in visual studio for all projects without having to add something each time.
Make sure you have Just My Code Enabled by going into Tools-->Options-->Debugger-->General--> Enable Just My Code. This will change your Debug--> Windows --> Exceptions Settings Dialog Box to show a CheckBox for JavaScript RunTime Exceptions.
Javascript RunTime Exceptions:
See this answer for previous versions of Visual Studio
Sounds like you want JSLint
You can also look into using TypeScript which is a superset of javascript and allows you to strongly type your javascript.

How to do Javascript debug logging

I am writing an Angular app, with bit and pieces of JQuery plugins around the place.
Some of the logic is pretty complex and I'd like to have some debug logging that I can leave in the codebase that won't print out to the console in production.
What are people using to achieve this these days? I know Angular has its own logging but this logging needs to be across both the Angular stuff and the JQuery stuff. I can't rewrite the JQuery to be 'angularised'.
How can I best achieve this?
Maybe you can try chrome develop tools?
WIN: ctrl+shift+j
MAC: command+shift+j.
sources - > your script - > double click to add a breakpoint -> refresh
Here is a shortcut.
Definitely breakpoints but you also need to check out
Batarang - chrome extension developed by angular team. I find it extremely useful for scope inheritance. It does crash now and then but it is still quite useful.

How do I properly run the VJET development tools for NodeJS on Eclipse?

The default javascript editor for Eclipse has very poor outlining and code completion. As a result of this, for any modern javascript application like ExtJS or NodeJS where you need to write a lot of object literal statements, Eclipse becomes pretty useless. And it is impossible to ask how to do this properly.
Now I found that Ebay Open Source seems to have tools that are specifically designed to replace this flaw in the standard editors, both for javascript in general as for NodeJS specifically.
Installing the normal NodeJS V8 debugger on a default WDT install of Eclipse is pretty straightforward, and apart from setting up some script mapping, it's easy to get to work.
But when I tried installing VJET, stuff just didn't work. No code assist at all, no debugging anymore, nothing. VJET mode was set as default for debugging and stuff, but when I couldn't get it to work, I couldn't find any option to switch back to normal Eclipse/JS Editor/V8 Debugger either. Even when I removed all VJET stuff, my Eclipse installation was bombed and a complete wipe of the workspace and home configuration + downloads finally fixed this.
So I was hoping that anyone could explain:
What are the exact steps to getting VJET to work for Node.JS development in Eclipse, and possibly how can one switch between 'VJET' mode and 'default' mode?

Aptana 3.0.5 Problems View with JavaScript

I've recently looked into migrating off Coda and over to Aptana. So I could get some realtime JavaScript/HTML/CSS error and warning notifications, as well as intellisense while programming. I installed Aptana 3.0.5 and set up the Validation to include JSLint.
I notice warning icons next to line numbers, but no list of warnings or errors appear in the Problems view/panel and this puzzles me.
I'm running OS X Lion 10.7.1, and decide to test on my MacBook Pro. Same thing occurs.
I locate a Snow Leopard 10.5.8 system and try it out, and the same thing occurs.
So now I'm wondering; Do errors and warnings in JavaScript even appear in the Problems View? And if not, does this mean I just have to scroll up and down the file to locate errors this way?
Thanks
[EDIT: I went back to Aptana 2.0 and the Validation View seems to be working correctly.]
Are you opening the file from a project in the workspace or directly from the local filesystem? If the latter, this is currently the expected behavior, as Problems view only handles markers from workspace resources.
You could promote a local folder to become a project using the instructions here, and then opening the JS file in the project will make the errors appear in the Problems view.
Hope this helps.

Categories