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 ? Commented Jun 21, 2017 at 10:53

3 Answers 3


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 .

  • Mohit - Thnx. Do we have a facility to upload folder/.zip file also if we dont have access to that org etc ? Please guide ! Commented May 19, 2017 at 16:34
  • I login into the salesforce already and login into heroku app, but I see nothing is happening Commented May 19, 2017 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 Commented May 19, 2017 at 17:41
  • Can we add our custom rules ? Its a nice utility. Commented May 19, 2017 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 Commented May 19, 2017 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.

  • 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
    Commented May 19, 2017 at 23:48

If you use CI/CD, you can use Mega-Linter , a 70 linters aggregator, including sfdx-scanner (apex PMD + eslint)

This does not solve the issue locally (except if your computer have docker, in that can you can run Mega-Linter locally), but at least it will block junior issues to be deployed in your shared code base

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .