0

I was using Moment.js in my static resource. But after Winter 17 update it stopped working. So i have to make some changes in moment.js to make it work. Now my Question is How can we run lightning cli check for static resource. If i have only static resource in my folder then lightning cli will not run.

Then what i tried is copied a .cmp file in same folder in which moment.js is present. then when i ran Lightning cli scan i got Following Error

/home/manjot/.local/share/heroku/plugins/node_modules/salesforce-lightning-cli/rules/ecma-intrinsics.js:64 if (!api.hasOwnProperty(token)) { ^

TypeError: api.hasOwnProperty is not a function at EventEmitter.MemberExpression (/home/manjot/.local/share/heroku/plugins/node_modules/salesforce-lightning-cli/rules/ecma-intrinsics.js:64:30) at emitOne (events.js:101:20) at EventEmitter.emit (events.js:188:7) at NodeEventGenerator.enterNode (/home/manjot/.local/share/heroku/plugins/node_modules/eslint/lib/util/node-event-generator.js:40:22) at CodePathAnalyzer.enterNode (/home/manjot/.local/share/heroku/plugins/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23) at CommentEventGenerator.enterNode (/home/manjot/.local/share/heroku/plugins/node_modules/eslint/lib/util/comment-event-generator.js:97:23) at Controller.traverser.traverse.enter (/home/manjot/.local/share/heroku/plugins/node_modules/eslint/lib/eslint.js:905:36) at Controller.__execute (/home/manjot/.local/share/heroku/plugins/node_modules/estraverse/estraverse.js:397:31) at Controller.traverse (/home/manjot/.local/share/heroku/plugins/node_modules/estraverse/estraverse.js:501:28) at Controller.Traverser.controller.traverse (/home/manjot/.local/share/heroku/plugins/node_modules/eslint/lib/util/traverser.js:36:33)

I need to know how we can check static resource file using lighnting cli?

0

If you sync your static resource in your ide (mavensmate/eclipse), it'll download the resource to your local machine. Then you run the ClI with the --files option.

heroku lightning:lint ./path/to/static/resource --files **/*fileName.js
  • i have done that but lightning cli is not able to recognize any js file in static resource folder. – Manjot Singh Feb 15 '17 at 9:26

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.