Javascript

Salesforce Lightning component Code review using Heroku CLI

Salesforce Lightning component Code review using Heroku CLI

Salesforce Lightning component Code review using Heroku CLI
Salesforce Lightning component Code review using Heroku CLI
The code quality is one of the biggest concern and challenge for developers.  Salesforce do have certain automated tool which does the code review for eg:- Force.com Scanner . These tools can be used to check the apex code from the quality and security prospective.

Salesforce Lightning CLI is a linting tool based on open source project ESLint . This tool is extremely helpful in detecting the errors in the Javascript code used in the lighting components. This tool is made keeping in mind the locker service and checks if the code is accessing DOM elements outside the current scope.

Pre step to install Salesforce Lightning CLI is to have Heroku CLI toolbelt installed.If you don't have heroku toolbelt installed than install it from https://blog.heroku.com/the_heroku_toolbelt . 

Now open command line and start installing the Salesforce lightning CLI plugin using command: heroku plugins:install salesforce-lightning-cli


To perform code review use the below mentioned syntax.
heroku lightning:lint "C:/path/to/lightning/components/xxx.js"

Will add the Complete Video explaination Soon !

About Saurabh Dua

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.

Powered by Blogger.