{"id":5539,"date":"2016-06-15T17:30:16","date_gmt":"2016-06-15T17:30:16","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=5539"},"modified":"2017-05-02T02:45:45","modified_gmt":"2017-05-02T02:45:45","slug":"lightning-component-code-review-using-cli-video","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lightning-component-code-review-using-cli-video\/","title":{"rendered":"Lightning component code review using CLI &#8211; Video"},"content":{"rendered":"<p style=\"text-align: justify;\">Lightning CLI is code linting tool, which can be used to validate source code of Lightning components (Javascript files only). This tool is made specially keeping\u00a0<em>Locker Service\u00a0<\/em>in mind where we can validate if Lightnign component is breaking any contract while trying to access DOM element out of its own scope.<\/p>\n<p style=\"text-align: justify;\">Lightning CLI is based on open source project <a href=\"http:\/\/eslint.org\/\">ESLint<\/a>. Below video demonstrates how we can install Lightning CLI and use it for existing Lightning Components. You can <a href=\"https:\/\/www.youtube.com\/channel\/UCbhMqw4JGvDMj9sd8z77jug\">subscribe to my youtube channel<\/a> to get latest update on Salesforce related videos.<\/p>\n<p>Use below command to install heroku CLI plugin, assuming you already have heroku installed :<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n heroku plugins:install salesforce-lightning-cli\r\n<\/pre>\n<p>Get code review comments on screen as a text<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nheroku lightning:lint .\r\n<\/pre>\n<p>Get code review comment on screen as a JSON<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nheroku lightning:lint . -j\r\n<\/pre>\n<p>Export code review comments in a file<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nheroku lightning:lint . &gt; CodeReview.txt\r\nOR\r\nheroku lightning:lint . -j &gt; CodeReview.json\r\n<\/pre>\n<p style=\"text-align: justify;\">To export code review feedback generated by Salesforce Lightning CLI tool, <a href=\"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/export-or-print-code-review-feedback-generated-by-salesforce-lightning-cli\/\">refer this blog post<\/a>.<\/p>\n<p style=\"text-align: justify;\"><!--more--><\/p>\n<p><iframe loading=\"lazy\" title=\"Lightning Component Code Review Tool\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/f1Zn61WYMZM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><strong>Related Resources :<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/cloudyworlds.blogspot.com\/2016\/04\/lightning-locker-service-salesforce.html\">Lightning Locker Service &#8211; Mohit<\/a><\/li>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.lightning.meta\/lightning\/cli_intro.htm\">Salesforce Lightning CLI documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Video tutorial explaining how we can use Lightning CLI to identify possible issues and enhancements needed for Lightning Component and enabling it for Locker Service<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[311,212],"class_list":["post-5539","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-lightning-component","tag-video-tutorial"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6017,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/export-or-print-code-review-feedback-generated-by-salesforce-lightning-cli\/","url_meta":{"origin":5539,"position":0},"title":"Export or print code review feedback generated by Salesforce Lightning CLI","author":"Jitendra","date":"May 2, 2017","format":false,"excerpt":"How to print or export code review feedback report generated by Salesforce Lightning CLI tool","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Export Salesforce Lightning CLI code review report","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1200%2C710&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1200%2C710&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1200%2C710&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1200%2C710&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1200%2C710&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":5987,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/use-lightning-components-on-external-websites-lightning-out\/","url_meta":{"origin":5539,"position":1},"title":"Use Lightning Components on external websites &#8211; Lightning Out","author":"Jitendra","date":"April 5, 2017","format":false,"excerpt":"How to use Lightning component in node.js (External websites) by using Lightning Out. It shows how to enable CORS and SSL in Node.js with Video and complete source code.","rel":"","context":"In &quot;Lightning&quot;","block_context":{"text":"Lightning","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/lightning\/"},"img":{"alt_text":"Show Lightning Component in Node.js using Lightning Out","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/04\/Show-Lightning-Component-in-Node.js-using-Lightning-Out.png?fit=1162%2C637&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/04\/Show-Lightning-Component-in-Node.js-using-Lightning-Out.png?fit=1162%2C637&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/04\/Show-Lightning-Component-in-Node.js-using-Lightning-Out.png?fit=1162%2C637&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/04\/Show-Lightning-Component-in-Node.js-using-Lightning-Out.png?fit=1162%2C637&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/04\/Show-Lightning-Component-in-Node.js-using-Lightning-Out.png?fit=1162%2C637&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4698,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/my-favorite-appexchange-products\/","url_meta":{"origin":5539,"position":2},"title":"Top Salesforce tools , AppExchange and Heroku applications","author":"Jitendra","date":"July 1, 2015","format":false,"excerpt":"List of all my favorite Appexchange products, Heroku applications , Git repository , Free Source codes and some important Blog posts in Salesforce","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Top Salesforce Tools","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":6176,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lookup-component-in-salesforce-lightning\/","url_meta":{"origin":5539,"position":3},"title":"Lookup component in Salesforce Lightning","author":"Jitendra","date":"July 6, 2017","format":false,"excerpt":"Salesforce Lightning component in plain JavaScript and SLDS with complete source code","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Lightning Lookup Component","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Lookup-Component.png?fit=978%2C285&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Lookup-Component.png?fit=978%2C285&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Lookup-Component.png?fit=978%2C285&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Lookup-Component.png?fit=978%2C285&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":6419,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/introduction-to-lightning-test-services-with-jasmine\/","url_meta":{"origin":5539,"position":4},"title":"Introduction to Lightning Test Services with Jasmine","author":"Jitendra","date":"March 10, 2018","format":false,"excerpt":"Complete Source code and video of using Lightning Datatable Component and Jasmine in Salesforce","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Lightning Testing Service (LTS)","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/03\/Lightning-Testing-Service-LTS.png?fit=1200%2C433&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/03\/Lightning-Testing-Service-LTS.png?fit=1200%2C433&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/03\/Lightning-Testing-Service-LTS.png?fit=1200%2C433&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/03\/Lightning-Testing-Service-LTS.png?fit=1200%2C433&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/03\/Lightning-Testing-Service-LTS.png?fit=1200%2C433&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":5796,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lightning-data-services-standard-controller-for-lightning-components\/","url_meta":{"origin":5539,"position":5},"title":"Lightning Data Service &#8211; Standard Controller for Lightning Components","author":"Jitendra","date":"July 22, 2017","format":false,"excerpt":"Best Practices for Salesforce Lightning Component. How Lightning Data Service can improve Lightning Component performance and solve inconsistent data problem without writing single line of Apex code. Demo source code, image and slides included.","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"Salesforce Lightning Data Services","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Data-Services.png?fit=1045%2C395&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Data-Services.png?fit=1045%2C395&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Data-Services.png?fit=1045%2C395&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/07\/Salesforce-Lightning-Data-Services.png?fit=1045%2C395&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/5539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=5539"}],"version-history":[{"count":8,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/5539\/revisions"}],"predecessor-version":[{"id":6020,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/5539\/revisions\/6020"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=5539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=5539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=5539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}