go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  How to intsall JSHint
 
Subject: How to intsall JSHint
Author: Alex_Raj
In response to: Turn On JavaScript Content Assist
Posted on: 08/07/2019 09:39:36 PM

Starting from:

https://marketplace.eclipse.org/content/jshint-eclipse


Go to:

https://github.com/eclipsesource/jshint-eclipse/releases


Copy the URL address:

http://github.eclipsesource.com/jshint-eclipse/updates/


Then go to Eclipse: Help > Install New Software ... > Add

Name: JSHint
Location: http://github.eclipsesource.com/jshint-eclipse/updates/

Restart Eclipse.

Go to your project folder and create a file named .jshintrc with the following content:

{
    "bitwise" : true,
    "camelcase" : false,
    "curly" : true,
    "eqeqeq" : true,
    "es3" : true,
    "forin" : true,
    "immed" : true,
    "latedef" : "nofunc",
    "newcap" : true,
    "noarg" : true,
    "noempty" : true,
    "nonew" : true,
    "plusplus" : false,
    "quotmark" : false,
    "undef" : true,
    "unused" : "vars",
    "strict" : false,
    "trailing" : true,
    "maxlen" : false,
    "laxbreak" : true,
    "globals" : {
        "window" : false,
        "document" : false,
        "jQuery" : false,
        "sap" : false,
        "cockpit" : false,
        "URI" : false,
        "getCurrentAccount" : false,
        "setTimeout" : false
    }
}


Finally, right-click on your project and go to Properties > JSHint . Specify which files and folders you want your JSHint to take effect on.

 

> On 08/07/2019 12:41:25 AM Alex_Raj wrote:

While coding JavaScript, you would like the code assistance same way as in Java.

<html>
<body>

<script type="text/javascript">

window.???

</script>

</body>
</html>


Here, a list of available functions should automatically pop-up after your typing window.. To achieve that, you need to enable it; otherwise you have to 'Ctrl+Space' to trigger it.

How to activate it?

  • Go to Window > Preferences > JavaScript > Editor > Content Assist > Auto-Activation
  • Check Enable auto activation
  • Press OK


    Note: JavaScript Content Assist seems not to function starting from v4.6 Neon:

    Luna 4.4 (ok) --> Mars 4.5 (ok) --> Neon 4.6 (ko) --> Oxygen 4.7 (ko) --> Photon 4.8 (ko)





    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.