{"id":6017,"date":"2017-05-02T02:44:00","date_gmt":"2017-05-02T02:44:00","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=6017"},"modified":"2017-06-21T17:47:06","modified_gmt":"2017-06-21T17:47:06","slug":"export-or-print-code-review-feedback-generated-by-salesforce-lightning-cli","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/export-or-print-code-review-feedback-generated-by-salesforce-lightning-cli\/","title":{"rendered":"Export or print code review feedback generated by Salesforce Lightning CLI"},"content":{"rendered":"<p><strong>Update :<\/strong> We can use this <a href=\"https:\/\/lightning-linter.herokuapp.com\/\">heroku app<\/a> to scan Lightning component online and get code review feedback. Complete source code is <a href=\"https:\/\/github.com\/joshbirk\/lightning-linter-service\">available here<\/a>. We don&#8217;t need to install Lightning CLI until its project compliance issue.<\/p>\n<figure id=\"attachment_6156\" aria-describedby=\"caption-attachment-6156\" style=\"width: 936px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6156\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-Component-Code-review-Javascript-lint.jpg?resize=936%2C734&#038;ssl=1\" alt=\"Salesforce Lightning Component - Code review - Javascript lint\" width=\"936\" height=\"734\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-Component-Code-review-Javascript-lint.jpg?w=936&amp;ssl=1 936w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-Component-Code-review-Javascript-lint.jpg?resize=300%2C235&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-Component-Code-review-Javascript-lint.jpg?resize=768%2C602&amp;ssl=1 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><figcaption id=\"caption-attachment-6156\" class=\"wp-caption-text\">Salesforce Lightning Component &#8211; Code review &#8211; Javascript lint<\/figcaption><\/figure>\n<hr \/>\n<p style=\"text-align: justify;\">In <a href=\"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lightning-component-code-review-using-cli-video\/\">this post<\/a>, we discussed that how <strong>Lightning CLI<\/strong> can be used to get a <strong>code review<\/strong> information of custom Lightning component. However, code review is either printed or exported as a file in text or JSON format. <strong>Question is, how to get Lightning component code review feedback in HTML or PDF format ?<\/strong><\/p>\n<p style=\"text-align: justify;\">I tried <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.lightning.meta\/lightning\/cli_options.htm\">various options available<\/a> here however there were no way to export code review feedback generated by Lightning CLI. Output generated by Lightning CLI is not presentable to business executives or clients.<\/p>\n<p style=\"text-align: justify;\">Finally, I came up with <a href=\"https:\/\/cli-report.herokuapp.com\/\">very simple Heroku application<\/a>, which can be used to get <strong>Lightning CLI code review feedback in HTML or pdf format<\/strong>. We need to run below command to get CLI code review in JSON format.<!--more--><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n heroku lightning:lint . -j &gt; CodeReview.json\r\n<\/pre>\n<p style=\"text-align: justify;\">Once JSON file <em>(CodeReview.json)<\/em> is created, copy and paste its content in text box of <a href=\"https:\/\/cli-report.herokuapp.com\/index.html\">this application<\/a> and click on\u00a0<em>convert to HTML\u00a0<\/em>button. It will ignore all blank results of Lightning component and only displays actual result. We can sort on various columns as well. To export this table, simply click on print icon. Complete source code is\u00a0<a href=\"https:\/\/github.com\/JitendraZaa\/Lightning-CLI-JSON-to-HTML-Table\">available here.<\/a><\/p>\n<p><iframe loading=\"lazy\" title=\"Export or print code review feedback generated by Salesforce Lightning CLI\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/33dFiTa1-w4?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","protected":false},"excerpt":{"rendered":"<p>How to print or export code review feedback report generated by Salesforce Lightning CLI tool<\/p>\n","protected":false},"author":1,"featured_media":6018,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":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":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[348,311,212],"class_list":["post-6017","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salesforce","tag-best-practices","tag-lightning-component","tag-video-tutorial"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/05\/Salesforce-Lightning-CLI-code-review-report.png?fit=1370%2C811&ssl=1","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":5539,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lightning-component-code-review-using-cli-video\/","url_meta":{"origin":6017,"position":0},"title":"Lightning component code review using CLI &#8211; Video","author":"Jitendra","date":"June 15, 2016","format":false,"excerpt":"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","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/f1Zn61WYMZM\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7072,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/share-javascript-code-in-lightning-web-component-to-read-url-parameters\/","url_meta":{"origin":6017,"position":1},"title":"Share JavaScript Code in Lightning Web Component to Read URL Parameters","author":"Jitendra","date":"May 4, 2020","format":false,"excerpt":"Building Reusable LWC Component to read query string from URL","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6176,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/lookup-component-in-salesforce-lightning\/","url_meta":{"origin":6017,"position":2},"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":7140,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/using-custom-label-in-lightning-web-components-lwc\/","url_meta":{"origin":6017,"position":3},"title":"Using Custom Label in Lightning Web Components &#8211; LWC","author":"Jitendra","date":"April 4, 2020","format":false,"excerpt":"Quick Code Snippet on how to use custom label in Lightning Web Components - LWC","rel":"","context":"In &quot;Lightning Web Components&quot;","block_context":{"text":"Lightning Web Components","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/lightning-web-components\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4493,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/create-collapsible-panel-component-in-lightning\/","url_meta":{"origin":6017,"position":4},"title":"Salesforce  Lightning Component &#8211; expand and collapsable panel example","author":"Jitendra","date":"May 22, 2015","format":false,"excerpt":"How to use aura:facet component and Learn creating expand and collapsable reusable lightning component in Salesforce","rel":"","context":"In &quot;Lightning&quot;","block_context":{"text":"Lightning","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/lightning\/"},"img":{"alt_text":"Lightning CollapsiblePanel Component - Expanded","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Lightning-CollapsiblePanel-Component-Expanded.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Lightning-CollapsiblePanel-Component-Expanded.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Lightning-CollapsiblePanel-Component-Expanded.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Lightning-CollapsiblePanel-Component-Expanded.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5852,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/how-to-document-lightning-component\/","url_meta":{"origin":6017,"position":5},"title":"How to Document Lightning Component","author":"Jitendra","date":"December 19, 2016","format":false,"excerpt":"Demo and Example, showing process of documenting Lightning Component","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Documentaing Lightning Component","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/12\/Documentaing-Lightning-Component.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/12\/Documentaing-Lightning-Component.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/12\/Documentaing-Lightning-Component.gif?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/12\/Documentaing-Lightning-Component.gif?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/12\/Documentaing-Lightning-Component.gif?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/6017","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=6017"}],"version-history":[{"count":3,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/6017\/revisions"}],"predecessor-version":[{"id":6157,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/6017\/revisions\/6157"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media\/6018"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=6017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=6017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=6017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}