I've the Salesforce Lightning code and referring the link https://www.npmjs.com/package/salesforce-lightning-cli and where on my local machine I installed the Nodejs and Heroku. Now I can successfully utilized the command line which scans my Lightning code and gives me the coding conventions & suggestions.

But, real problem which I see that each user has to manually setup the Nodejs and Heroku on their machine (have 150 SFDC developers) in my team. Instead of asking each developer to setup the code, I need to have a setup somewhere (on server) where we will upload the code and scan the code and result will display on server only.

What is the best/correct way to do it ?

  • @Mohit - Can we add some custom rules per our choice into the CLI or web warpper? Is this possible ? – user4567570 Jun 21 '17 at 10:53

You can use the online linter for the same .

It is not officially supported but it exists as an heroku application


You just salesforce login and it will automatically scan the code and let you know the vulnerabilities .

|improve this answer|||||
  • Mohit - Thnx. Do we have a facility to upload folder/.zip file also if we dont have access to that org etc ? Please guide ! – user4567570 May 19 '17 at 16:34
  • I login into the salesforce already and login into heroku app, but I see nothing is happening – user4567570 May 19 '17 at 17:01
  • If you have lightning components it does show you any rule thats been violated .There is no provision to upload zip file – Mohith Shrivastava May 19 '17 at 17:41
  • Can we add our custom rules ? Its a nice utility. – user4567570 May 19 '17 at 18:14
  • I doubt you can add your custom rules . What you can do is to clone the repo as it is open source project and put your custom rules and deploy to the heroku instance .Hope that helps – Mohith Shrivastava May 19 '17 at 18:25

If I were you I'd use npm/node as intended and create a package.json file and commit it to a git repo with the developer dependencies. You can add scripts to be executed using npm via the npm run command for ensuring the lightning Cli is installed. Your developers will have to pull from the repo and run some setup prior to being able to use the client, but that's just the cost of modern development. Using an online tool is going to be more costly in time and efficiency.

|improve this answer|||||
  • Not sure I agree with this "Using an online tool is going to be more costly in time and efficiency." in the context of this question – Eric May 19 '17 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.